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.csproj and CSTesting.NUnit.csproj (or NuGet packages CSTesting and CSTesting.NUnit per README.md).
  • Write [TestFixture] classes with [Test] methods; use static CSTesting.CSTesting.CreateBrowserAsync or using static CSTesting.CSTesting.
  • Optional: inherit CSTestingNUnitBrowserFixtureBase for automatic CloseAsync after 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 / buildSupported?Notes
dotnet testYesPrimary way to run NUnit tests.
NUnitYesExpected framework for samples and CSTesting.NUnit.
CSTestingRunner (Java)N/ANot used in .NET docs.
Maven / Gradle (Java)N/AUse dotnet CLI instead.