|
1 | 1 | # Akka.MultiNode.TestAdapter |
2 | 2 |
|
3 | | -Visual Studio 2019 Test Explorer and .NET CLI Test runner for the Akka.NET MultiNode tests |
| 3 | +Visual Studio 2019 Test Explorer, JetBrains Rider, and .NET CLI Test runner for the Akka.NET MultiNode tests |
4 | 4 |
|
5 | 5 | ## Documentation |
6 | | -`Akka.MultiNode.TestAdapter` is a standalone .NET CLI and VSTest adapter for Akka.NET multi node testkit; |
7 | | -It allows you to run multinode tests directly inside Visual Studio Text Explorer window and run them |
8 | | -using the `dotnet test` .NET CLI command. |
| 6 | +`Akka.MultiNode.TestAdapter` is a standalone test adapter for Akka.NET multi node testkit; it is based on the popular Xunit test framework to allow multinode tests to run directly inside popular C# IDE such as Microsoft Visual Studio and JetBrains Rider and run them using the `dotnet test` .NET CLI command. |
9 | 7 |
|
10 | | -To use the VSTest test adapter in your multinode spec projects, You will need to add these nuget packages: |
| 8 | +To use the test adapter in your multinode spec projects, You will need to add these nuget packages: |
11 | 9 | - [Akka.MultiNode.TestAdapter](https://www.nuget.org/packages/Akka.MultiNode.TestAdapter) |
12 | 10 | - [Microsoft.NET.Test.Sdk](https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/) |
13 | 11 |
|
14 | 12 | Documentation regarding the multinode specs themselves can be read in the Akka.NET documentation pages: |
15 | 13 | - [Using the MultiNode TestKit](https://getakka.net/articles/networking/multi-node-test-kit.html) |
16 | 14 | - [Multi-Node Testing Distributed Akka.NET Applications](https://getakka.net/articles/testing/multi-node-testing.html) |
17 | 15 |
|
18 | | -### VSTest .runsettings |
19 | | -This is the .runsettings XML sub-section `Akka.MultiNode.TestAdapter` can use: |
20 | | -```xml |
21 | | -<?xml version="1.0" encoding="utf-8"?> |
22 | | -<RunSettings> |
23 | | - <MultiNodeTestRunnerOptions> |
24 | | - <ListenAddress>127.0.0.1</ListenAddress> |
25 | | - <ListenPort>0</ListenPort> |
26 | | - <ClearOutputDirectory>false</ClearOutputDirectory> |
27 | | - <UseTeamCityFormatting>false</UseTeamCityFormatting> |
28 | | - </MultiNodeTestRunnerOptions> |
29 | | -</RunSettings> |
| 16 | +### Json Settings |
| 17 | + |
| 18 | +This test adapter follows the Xunit convention on loading test configuration via a json file. It will |
| 19 | +check the directory where the test assembly is located for a `[Assembly Name].xunit.multinode.runner.json` |
| 20 | +or a `xunit.multinode.runner.json` file. |
| 21 | + |
| 22 | +```json |
| 23 | +{ |
| 24 | + "outputDirectory": "TestResults", |
| 25 | + "failedSpecsDirectory": "FAILED_SPECS_LOGS", |
| 26 | + "listenAddress": "127.0.0.1", |
| 27 | + "listenPort": 0, |
| 28 | + "clearOutputDirectory": false |
| 29 | +} |
30 | 30 | ``` |
31 | 31 |
|
32 | | -- **ListenAddress**: Determines the address that this multi-node test runner will use to listen for log messages from individual spec. |
33 | | -- **ListenPort**: Determines the port number that this multi-node test runner will use to listen for log messages from individual spec. |
34 | | -- **ClearOutputDirectory**: Clear the output directory before running the test session. If set to false, all test logs are appended to the out file. |
35 | | -- **UseTeamCityFormatting**: Use TeamCity formatting on the log outputs. |
| 32 | +* **outputDirectory**: Determines output directory for all log output files. |
| 33 | +* **failedSpecsDirectory**: Determines output directory for aggregated failed test logs. |
| 34 | +* **listenAddress**: Determines the address that this multi-node test runner will use to listen for log messages from individual spec. |
| 35 | +* **listenPort**: Determines the port number that this multi-node test runner will use to listen for log messages from individual spec. |
| 36 | +* **ClearOutputDirectory**: Clear the output directory before running the test session. If set to false, all test logs are appended to the out file. |
36 | 37 |
|
37 | 38 | ## Building this solution |
38 | 39 | To run the build script associated with this solution, execute the following: |
|
0 commit comments