AceReports.Reqnroll
1.0.1
dotnet add package AceReports.Reqnroll --version 1.0.1
NuGet\Install-Package AceReports.Reqnroll -Version 1.0.1
<PackageReference Include="AceReports.Reqnroll" Version="1.0.1" />
<PackageVersion Include="AceReports.Reqnroll" Version="1.0.1" />
<PackageReference Include="AceReports.Reqnroll" />
paket add AceReports.Reqnroll --version 1.0.1
#r "nuget: AceReports.Reqnroll, 1.0.1"
#:package AceReports.Reqnroll@1.0.1
#addin nuget:?package=AceReports.Reqnroll&version=1.0.1
#tool nuget:?package=AceReports.Reqnroll&version=1.0.1
AceReports.Reqnroll
Zero-setup HTML reporting for Reqnroll: one self-contained file per run with every scenario, its steps, tags and example row, plus logs, API traffic, screenshots, retries and flaky scenarios.
Setup
Install the package next to your Reqnroll runner package. That's all:
dotnet add package AceReports.Reqnroll
AceReports.Reqnroll is a Reqnroll runtime plugin. Reqnroll loads it by itself (the assembly is named
AceReports.Reqnroll.ReqnrollPlugin.dll), so there are no hooks to write and nothing to add to
reqnroll.json. It works with every runner Reqnroll supports — Reqnroll.xunit.v3,
Reqnroll.xUnit, Reqnroll.NUnit, Reqnroll.MsTest, Reqnroll.TUnit. The report is written when
the test run finishes, to TestResults/AceReport_<timestamp>.html next to your test binaries.
Together with an Ace Reports runner package
If the same project also uses AceReports.Xunit, AceReports.NUnit or AceReports.MSTest (for example
because it mixes plain tests with scenarios), install both: the runner package records every test,
and this plugin adds the scenario title, feature, tags, example row and steps to it. Nothing is
reported twice.
Configuration
Add a class implementing IAceReportsStartup anywhere in the test project. Ace Reports finds it and
calls it before the first scenario 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
| Reqnroll | Report |
|---|---|
| Scenario / Scenario Outline example | one row, named by the scenario title; example values listed as column=value |
| Feature title | the "Test Group" column |
| Tags (scenario, rule and feature) | category tags; runner tags such as @retry(5) and @ignore are left out |
| Each step | a GIVEN / WHEN / THEN / AND / BUT log line with its doc string or table; a failing step's error; steps skipped after a failure |
@retry (xRetry.Reqnroll) or any runner retry |
every attempt, with its own steps, logs, API calls and screenshots; a scenario that passes after failing is marked flaky |
| Pending, undefined or ignored scenarios | left out of the table |
Logging and screenshots
[When("the customer pays")]
public async Task WhenTheCustomerPays()
{
Ace.Info("Submitting payment");
await _checkout.PayAsync();
Ace.TakeScreenshot("After payment");
}
A screenshot is taken automatically when a scenario fails. Step definitions usually get their page
or driver through dependency injection, so hand it over once — in a [BeforeScenario] hook, for
example — and both Ace.TakeScreenshot() and the failure screenshot use it:
Ace.UseScreenshotSource(page); // Playwright IPage, Selenium IWebDriver, ...
Screenshots and teardown
The automatic failure screenshot is taken when Ace Reports records the scenario, and that happens
after Reqnroll's [AfterScenario] hooks. A hook 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:
[AfterScenario]
public async Task CloseBrowser()
{
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)
- Reqnroll (>= 3.0.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.