Skip to content

Rework the example for sdk-dotnet 5.0.0 and VRT 6.0 - #3

Merged
pashidlos merged 4 commits into
mainfrom
sdk-dotnet-5
Nov 2, 2026
Merged

pashidlos merged 4 commits into
mainfrom
sdk-dotnet-5

Conversation

@pashidlos

Copy link
Copy Markdown
Member

Replaces the 2020 dotnet-script example (PlaywrightSharp 0.162 and SDK 4.7.0) with a runnable project for sdk-dotnet 5.0.0.

Example (playwright/)

  • An NUnit 5 project on net10.0. It runs on Microsoft.Testing.Platform, and global.json pins the SDK the same way sdk-dotnet does.
  • It uses Microsoft.Playwright 1.64.1 and VisualRegressionTracker 5.0.0 from NuGet. Microsoft.Playwright.NUnit is not used because it still targets NUnit 3.
  • TestSession is a SetUpFixture. It starts one VRT build for the whole run and stops it in OneTimeTearDown, even when a test fails, then closes the browser.
  • HomePageTests takes a full-page screenshot of https://the-internet.herokuapp.com and tracks it. New and Unresolved fail the test, either through the SDK's exception or, with enableSoftAssert, through the status assertion. Ok, Approved and AutoApproved pass.
  • Config comes from vrt.json, copied from vrt.json.example, or from VRT_* environment variables. vrt.json is gitignored and copied to the output folder, because the test host runs from bin/.
  • The README covers prerequisites, setup, run and what to expect in the VRT UI. The root README links the example.

CI

.github/workflows/ci.yml follows the one in examples-python:

  • It starts api/migration:6.0.0-rc1 from .github/vrt/docker-compose.yml. The API key and project are the default seed values.
  • It installs the Playwright Chromium headless shell.
  • It then runs the full flow:
    1. The first run must fail with No baseline.
    2. .github/vrt/approve-latest-build.sh logs in as the seed user. It checks that the failed run's build was stopped (isRunning == false), then approves it.
    3. The second run must pass.

Dependabot

Weekly, at most 5 open PRs per ecosystem:

  • nuget, with grouped minor/patch, major and security updates;
  • docker-compose for the VRT images (it will propose 6.0.0);
  • grouped github-actions.

For the owner

  • Bump .github/vrt/docker-compose.yml to 6.0.0 at the server release.
  • CI depends on the-internet.herokuapp.com staying the same between the two runs, which are about a minute apart.

🤖 Generated with Claude Code

pashidlos and others added 4 commits November 2, 2026 21:17
Replace the 2020 dotnet-script with an NUnit project on .NET 10 that uses
Microsoft.Playwright and VisualRegressionTracker 5.0.0 from NuGet. CI runs
it against a 6.0.0-rc1 server: the first run fails on the new baseline,
the build is approved through the API, and the second run passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test

Also derive the viewport tag from the page, install only the headless shell,
and require the first CI run to fail on the missing baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y tee

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pashidlos
pashidlos merged commit e79cde2 into main Nov 2, 2026
1 check passed
@pashidlos
pashidlos deleted the sdk-dotnet-5 branch November 2, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant