Dramaturge.NUnit 0.0.1

dotnet add package Dramaturge.NUnit --version 0.0.1
                    
NuGet\Install-Package Dramaturge.NUnit -Version 0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dramaturge.NUnit" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dramaturge.NUnit" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Dramaturge.NUnit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dramaturge.NUnit --version 0.0.1
                    
#r "nuget: Dramaturge.NUnit, 0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dramaturge.NUnit@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dramaturge.NUnit&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Dramaturge.NUnit&version=0.0.1
                    
Install as a Cake Tool

Dramaturge.NUnit

Base classes for NUnit tests that use Dramaturge.

Pre-release: Dramaturge is at version 0.0.x, and its API may change in any release.

  • One browser launch per test assembly, shared by every fixture, unless a fixture configures a launch of its own.
  • An isolated browser and page for each test, closed when the test ends, so no cookies or storage carry over.
  • Screenshots of a failed test's pages, and videos and a trace if asked for, saved under TestResults/Dramaturge and attached to the test's result.
  • The browser chosen by the environment: DRAMATURGE_BROWSER (chrome, firefox, edge, or safari), DRAMATURGE_CHANNEL, and DRAMATURGE_HEADED=1, or in code.

Getting Started

dotnet add package Dramaturge.NUnit

Register the shared browser once in the test project, outside any namespace:

using Dramaturge.NUnit;
using NUnit.Framework;

[SetUpFixture]
public class DramaturgeSetUp : DramaturgeSetUpFixture
{
}

Then derive test fixtures from PageTest:

using Dramaturge.NUnit;
using NUnit.Framework;
using static Dramaturge.Assertions;

public class SignInTests : PageTest
{
    [Test]
    public async Task SignsIn()
    {
        await this.Page.NavigateAsync("https://example.com/sign-in");
        await this.Page.GetByLabel("Email").FillAsync("someone@example.com");
        await this.Page.GetByRole("button", "Sign in").ClickAsync();
        await Expect(this.Page.GetByRole("heading", "Welcome")).ToBeVisibleAsync();
    }
}

BrowserTest gives a test its Group and NewBrowserAsync, for tests that need several isolated browsers. A test's browsers are kept on the fixture object, so to run the tests of one fixture in parallel, give it [FixtureLifeCycle(LifeCycle.InstancePerTestCase)].

The documentation describes the rest of Dramaturge.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1 38 10/8/2026