Dramaturge.TUnit
0.0.1
dotnet add package Dramaturge.TUnit --version 0.0.1
NuGet\Install-Package Dramaturge.TUnit -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.TUnit" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dramaturge.TUnit" Version="0.0.1" />
<PackageReference Include="Dramaturge.TUnit" />
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.TUnit --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Dramaturge.TUnit, 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.TUnit@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.TUnit&version=0.0.1
#tool nuget:?package=Dramaturge.TUnit&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Dramaturge.TUnit
Base classes for TUnit tests that use Dramaturge. TUnit 1.6 and later.
Pre-release: Dramaturge is at version 0.0.x, and its API may change in any release.
- One browser launch per test session, shared by every test class, unless a class 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/Dramaturgeand attached to the test's result. - The browser chosen by the environment:
DRAMATURGE_BROWSER(chrome,firefox,edge, orsafari),DRAMATURGE_CHANNEL, andDRAMATURGE_HEADED=1, or in code.
Getting Started
dotnet add package Dramaturge.TUnit
Register the shared browser once in the test project. TUnit runs hooks only from the assembly that declares them:
using Dramaturge.TUnit;
using TUnit.Core;
public static class DramaturgeSetUp
{
[Before(HookType.TestSession)]
public static void Register() => DramaturgeAssemblyFixture.Register(new());
[After(HookType.TestSession)]
public static Task CloseAsync() => DramaturgeAssemblyFixture.CloseAsync();
}
Then derive test classes from PageTest:
using Dramaturge.TUnit;
using TUnit.Core;
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.
The documentation describes the rest of Dramaturge.
| Product | Versions 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.
-
net10.0
- Dramaturge (>= 0.0.1)
- TUnit.Core (>= 1.6.0)
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 | 33 | 10/8/2026 |