Skip to content

Commit f8c7b9d

Browse files
Update RUNNING_TESTS.md for modern .NET
1 parent ded6f51 commit f8c7b9d

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

RUNNING_TESTS.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
## Overview
22

33
.NET client's test suite assumes there's a RabbitMQ node listening on `localhost:5672`
4-
(the default settings). SSL tests require a broker listening on the default
5-
SSL port. Connection recovery tests assume `rabbitmqctl` at `../rabbitmq-server/scripts/rabbitmqctl`
6-
can control the running node: this is the case when all repositories are cloned using
7-
the [umbrella repository](https://github.com/rabbitmq/rabbitmq-public-umbrella).
4+
(the default settings). TLS tests require a node listening on the default
5+
[TLS port](https://rabbitmq.com/ssl.html).
86

97
It is possible to use Visual Studio Community Edition .NET Core, and
108
`dotnet.exe` in `PATH`, to build the client and run the test suite.
@@ -24,7 +22,7 @@ build.bat
2422
On MacOS and linux run:
2523

2624
``` shell
27-
build.sh
25+
./build.sh
2826
```
2927

3028
This will complete the code AMQP 0-9-1 protocol code generation and build all projects. After this open the solution in Visual Studio.
@@ -43,7 +41,7 @@ Two options to accomplish this are covered below.
4341
### Option One: Using a RabbitMQ Release
4442

4543
It is possible to install and run a node using any [binary build](https://www.rabbitmq.com/download.html)
46-
suitable for the platform. Its [CLI tools]() then must be added to `PATH` so that `rabbitmqctl` can be
44+
suitable for the platform. Its [CLI tools](https://rabbitmq.com/cli.html) then must be added to `PATH` so that `rabbitmqctl` can be
4745
invoked directly without using an absolute file path. Note that this method does *not* work on Windows.
4846

4947
On Windows, you must run unit tests as follows (replace `X.Y.Z` with your RabbitMQ version):
@@ -53,21 +51,24 @@ set "RABBITMQ_RABBITMQCTL_PATH=C:\Program Files\RabbitMQ Server\rabbitmq_server-
5351
.\run-test.bat
5452
```
5553

56-
### Option Two: Using RabbitMQ Umbrella Repository
54+
### Option Two: Building a RabbitMQ Node from Source
5755

58-
Team RabbitMQ uses [rabbitmq-public-umbrella](https://github.com/rabbitmq/rabbitmq-public-umbrella),
59-
which makes it easy to run a RabbitMQ node [built from source](https://www.rabbitmq.com/build-server.html):
56+
T run a RabbitMQ node [built from source](https://www.rabbitmq.com/build-server.html):
6057

6158
```
62-
git clone https://github.com/rabbitmq/rabbitmq-public-umbrella umbrella
63-
cd umbrella
59+
git clone https://github.com/rabbitmq/rabbitmq-server.git rabbitmq-server
60+
cd rabbitmq-server
61+
62+
# assumes Make is available
6463
make co
6564
cd deps/rabbit
6665
make
6766
make run-broker
6867
```
6968

70-
`rabbitmqctl` location will be computed using a relative path in the umbrella.
69+
`rabbitmqctl` location will be computed using a relative path under the source repository,
70+
in this example, it should be `./rabbitmq-server/deps/rabbit/sbin/rabbitmqctl`.
71+
7172
It is possible to override the location using `RABBITMQ_RABBITMQCTL_PATH`:
7273

7374
```
@@ -104,15 +105,15 @@ Running individual tests and fixtures on Windows is trivial using the Visual Stu
104105
To run a specific tests fixture on MacOS or Linux, use the NUnit filter expressions to select the tests to be run:
105106

106107
``` shell
107-
dotnet test projects/Unit -f netcoreapp3.1 --filter "Name~TestAmqpUriParseFail"
108+
dotnet test projects/Unit --filter "Name~TestAmqpUriParseFail"
108109

109-
dotnet test projects/Unit -f netcoreapp3.1 --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
110+
dotnet test projects/Unit --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
110111
```
111112

112113
## Running Tests for a Specific .NET Target
113114

114-
To only run tests on .NET Core:
115+
To run tests targeting .NET 6.0:
115116

116117
``` shell
117-
dotnet test -f netcoreapp3.1 projects/Unit
118+
dotnet test -f ".net6.0" projects/Unit
118119
```

0 commit comments

Comments
 (0)