Test runners
Introduction
CSTesting.DotNet targets NUnit and the standard dotnet test workflow (Microsoft.NET.Test.Sdk + NUnit3TestAdapter). The CSTesting packages add ICSTestingBrowser and helpers; they do not replace the .NET test host.
Supported: NUnit + dotnet test
- Add project references to
CSTesting.csprojandCSTesting.NUnit.csproj(or NuGet packagesCSTestingandCSTesting.NUnitperREADME.md). - Write
[TestFixture]classes with[Test]methods; usestatic CSTesting.CSTesting.CreateBrowserAsyncorusing static CSTesting.CSTesting. - Optional: inherit
CSTestingNUnitBrowserFixtureBasefor automaticCloseAsyncafter each test and optional pause-on-failure.
dotnet test
dotnet test --filter "FullyQualifiedName~MyNamespace.MyFixture"
See NUnit & lifecycle and Running and debugging tests.
xUnit / MSTest
The repository samples use NUnit. You could call CreateBrowserAsync from other frameworks, but the provided fixture base and CSTesting.NUnit attributes are NUnit-specific.
Project file
Reference CSTesting from your test .csproj:
<ItemGroup>
<ProjectReference Include="..\\src\\CSTesting\\CSTesting.csproj" />
<ProjectReference Include="..\\src\\CSTesting.NUnit\\CSTesting.NUnit.csproj" />
</ItemGroup>
CI (GitHub Actions, Azure DevOps, etc.)
Use the official .NET SDK action or hosted agent, then dotnet build, playwright install chromium, and dotnet test. Publish TRX or test logs as needed.
Recorded tests from EasyTesting
Export C# from the Node recorder (npx cstesting record ... --format cs), add the file to your test project, and run dotnet test as in README.md.
Parallel execution
Parallelism is governed by NUnit and your .runsettings / assembly attributes—not by CSTesting. Use separate processes or NUnit parallelism settings if you need isolation between heavy browser tests.
Summary
| Runner / build | Supported? | Notes |
|---|---|---|
dotnet test | Yes | Primary way to run NUnit tests. |
| NUnit | Yes | Expected framework for samples and CSTesting.NUnit. |
| CSTestingRunner (Java) | N/A | Not used in .NET docs. |
| Maven / Gradle (Java) | N/A | Use dotnet CLI instead. |