AceReports.NUnit
1.0.1
dotnet add package AceReports.NUnit --version 1.0.1
NuGet\Install-Package AceReports.NUnit -Version 1.0.1
<PackageReference Include="AceReports.NUnit" Version="1.0.1" />
<PackageVersion Include="AceReports.NUnit" Version="1.0.1" />
<PackageReference Include="AceReports.NUnit" />
paket add AceReports.NUnit --version 1.0.1
#r "nuget: AceReports.NUnit, 1.0.1"
#:package AceReports.NUnit@1.0.1
#addin nuget:?package=AceReports.NUnit&version=1.0.1
#tool nuget:?package=AceReports.NUnit&version=1.0.1
AceReports.NUnit
Zero-setup HTML reporting for NUnit: one self-contained file per run with logs, API traffic, screenshots, retries and flaky-test detection.
Setup
Install the package. That's all:
dotnet add package AceReports.NUnit
The package applies [assembly: AceReportsNUnit] to the test project during the build, so NUnit
calls Ace Reports at the start and end of the run and around every test. The report is written to
TestResults/AceReport_<timestamp>.html next to your test binaries.
To turn reporting off for a project: <EnableAceReports>false</EnableAceReports>.
Configuration
Add a class implementing IAceReportsStartup anywhere in the test project. Ace Reports finds it and
calls it before the first test runs:
using AceReports;
using AceReports.Configuration;
internal sealed class AceReportsStartup : IAceReportsStartup
{
public void Configure(AceReportsConfiguration options)
{
Ace.SuiteName("Smoke Suite");
Ace.EnvironmentName("UAT");
Ace.DarkTheme();
}
}
What is recorded
| NUnit | Report |
|---|---|
[Test], [TestCase(...)] |
one row per test case; TestCase values listed as name=value |
[Category] on the test, its class or the assembly |
category tags (a test can have several) |
[Retry(n)] |
every attempt, with its own logs, API calls, error and screenshots; a test that passes after failing is marked flaky |
[Ignore], Assert.Ignore, Assert.Inconclusive |
left out of the table |
Assert.Warn |
passed |
Logging and screenshots
Ace.Info("Submitting payment");
Ace.TakeScreenshot("After login");
A screenshot is taken automatically when a test fails. Ace Reports finds the page or driver itself when
it is a field or property of the test fixture (any member named like Page, Browser or Driver) — that
includes Playwright's PageTest base class. A page created as a local variable inside the test is
handed over once with Ace.UseScreenshotSource(page).
Screenshots and teardown
The automatic failure screenshot is taken when Ace Reports records the test, and that happens after the
framework's own teardown ([TearDown] in NUnit, [TestCleanup] in MSTest, [AfterScenario] in
Reqnroll). A teardown that closes the browser therefore leaves nothing to photograph. Either let the
run close the browser at the end, or take the screenshot yourself before closing:
Ace.TakeScreenshot("Final state");
await _browser.CloseAsync();
License
Ace Reports is source-available under the PolyForm Perimeter License 1.0.1.
Commercial terms (OEM, white-label, or a full buy-out) are available — see COMMERCIAL-LICENSE.md.
| 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. |
-
net10.0
- AceReports (>= 1.0.1)
- NUnit (>= 3.14.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixes an ambiguous IAceReportsStartup reference in AceReports.Xunit: If you referenced AceReports.Xunit.IAceReportsStartup, please change it to AceReports.IAceReportsStartup. Requires xUnit v3 4.0 or later.