Skip to content
RecipesDoc

Selenium (C#) with NUnit on Your Runner

Certyn runs your NUnit Selenium suite on your runner, with the .NET SDK installed once and kept between runs.

For .NET teams with Selenium tests in C# and NUnit who want Certyn to run them without installing .NET at every run.

Your setup

  • Selenium tests in C#, with NUnit and dotnet test.
  • A Linux host with Docker for a self-hosted runner.
  • The app is on staging, reachable from that host.
  • The code is on GitHub (or another host, with its token).

Say this to Certyn

Run our NUnit Selenium tests from github.com/acme/e2e on our runner against staging.

What Certyn does

  1. If you have no runner yet, opens the runner form. Add -e WORKSPACE_PATH=/srv/certyn-workspace \ to its docker run command before you run it.
  2. Opens a form for the repo token (GH_TOKEN for GitHub).
  3. On a Machine on the runner, installs the .NET SDK version your global.json or project files ask for into /workspace, once.
  4. Restores NuGet packages into /workspace (the runner points NUGET_PACKAGES there, like the npm and Maven caches).
  5. Passes the environment URL to the setting your tests read (a .runsettings parameter or an environment variable), and runs one test.
  6. Runs the suite with dotnet test and a TRX or JUnit logger, as a run or on a schedule.

What you get

  • A run report with failures grouped by cause.
  • One issue per real product bug, with evidence.
  • Later runs start fast: the SDK, NuGet packages and the clone are already in /workspace.

Limits

  • On Certyn's cloud this works too, but the SDK installs again at every run, which adds minutes.
  • Machines run Linux. Tests that need Windows (for example Windows-only APIs or a Windows browser) do not run.
  • Chromium and chromedriver are on the Machine. Another browser must be installed on the runner first.
  • All runs on this runner share the workspace folder. Give each runner pool its own folder.