TestRift.NUnit
0.6.0
dotnet add package TestRift.NUnit --version 0.6.0
NuGet\Install-Package TestRift.NUnit -Version 0.6.0
<PackageReference Include="TestRift.NUnit" Version="0.6.0" />
<PackageVersion Include="TestRift.NUnit" Version="0.6.0" />
<PackageReference Include="TestRift.NUnit" />
paket add TestRift.NUnit --version 0.6.0
#r "nuget: TestRift.NUnit, 0.6.0"
#:package TestRift.NUnit@0.6.0
#addin nuget:?package=TestRift.NUnit&version=0.6.0
#tool nuget:?package=TestRift.NUnit&version=0.6.0
TestRift.NUnit
TestRift.NUnit streams NUnit test run events (logs, status, stack traces, attachments) to the TestRift Server and enables a real-time web UI for browsing and analysis.
Experimental
TestRift is currently in an experimental phase. APIs, configuration, and data formats may change at any time without notice.
Required: TestRift Server
You need the server available before your tests execute. You can either run it yourself or let the plugin auto-start it.
- Server repo: testrift/testrift-server
- Run locally (manual):
pip install testrift-server
testrift-server
- Auto-start: set
autoStartServer.enabled: trueinTestRiftNUnit.yaml.- To start the server with a specific server config file, set
autoStartServer.serverYaml(passed asTESTRIFT_SERVER_YAML). - To automatically restart the server when the config changes, set
autoStartServer.restartOnConfigChange: true(starts the server with--restart-on-config).
- To start the server with a specific server config file, set
Install (NuGet)
dotnet add package TestRift.NUnit
Basic usage
Add the attribute and run hooks:
using TestRift.NUnit;
[assembly: TRLogger]
[SetUpFixture]
public class MyRunHooks : RunHooks
{
}
Configuration
Create a TestRiftNUnit.yaml file to configure the plugin (server connection, run metadata, grouping, and optional URL files).
The config is discovered from either:
TESTRIFT_NUNIT_YAML(filesystem path), or./TestRiftNUnit.yamlin the current working directory.
All string fields support ${env:VAR_NAME} expansion (missing variables expand to an empty string), which is useful in CI.
Example TestRiftNUnit.yaml:
autoStartServer:
enabled: true
serverYaml: TestRiftServer.yaml
restartOnConfigChange: true
serverUrl: http://localhost:8080
runName: CI run ${env:GITHUB_RUN_NUMBER}
runId: ${env:GITHUB_RUN_ID}
metadata:
- name: Firmware
value: ${env:FIRMWARE_BRANCH}
- name: CI
value: ${env:GITHUB_RUN_ID}
url: ${env:GITHUB_SERVER_URL}/${env:GITHUB_REPOSITORY}/actions/runs/${env:GITHUB_RUN_ID}
group:
name: ${env:PRODUCT}
metadata:
- name: Branch
value: ${env:BRANCH}
urlFiles:
runUrlFile: test_run_url.txt
groupUrlFile: test_group_url.txt
Notes:
autoStartServerYamlis resolved relative to the directory containingTestRiftNUnit.yaml(so you can keep both files together).
Links
- Repository:
https://github.com/testrift/testrift-nunit - Protocol reference:
https://github.com/testrift/testrift-server/blob/main/docs/websocket_protocol.md - Config reference:
https://github.com/testrift/testrift-nunit/blob/main/docs/config.md
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- MessagePack (>= 2.5.0 && < 3.0.0)
- NUnit (>= 3.7.0 && < 4.0.0)
- System.Memory (>= 4.5.5)
- System.Net.Http (>= 4.3.4 && < 5.0.0)
- YamlDotNet (>= 13.0.0 && < 16.0.0)
-
net6.0
- MessagePack (>= 2.5.0 && < 3.0.0)
- NUnit (>= 3.7.0 && < 4.0.0)
- YamlDotNet (>= 13.0.0 && < 16.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.