KaizenReport.Kensho.NUnit
0.3.0
dotnet add package KaizenReport.Kensho.NUnit --version 0.3.0
NuGet\Install-Package KaizenReport.Kensho.NUnit -Version 0.3.0
<PackageReference Include="KaizenReport.Kensho.NUnit" Version="0.3.0" />
<PackageVersion Include="KaizenReport.Kensho.NUnit" Version="0.3.0" />
<PackageReference Include="KaizenReport.Kensho.NUnit" />
paket add KaizenReport.Kensho.NUnit --version 0.3.0
#r "nuget: KaizenReport.Kensho.NUnit, 0.3.0"
#:package KaizenReport.Kensho.NUnit@0.3.0
#addin nuget:?package=KaizenReport.Kensho.NUnit&version=0.3.0
#tool nuget:?package=KaizenReport.Kensho.NUnit&version=0.3.0
KaizenReport.Kensho.NUnit
NUnit listener that emits the canonical Kensho v1 JSON
format. Run your tests, then point the kensho CLI at kensho-results/
to get a self-contained static HTML report.
Install
dotnet add package KaizenReport.Kensho.NUnit
Add a single line of wiring in any .cs file in the test project:
[assembly: KaizenReport.Kensho.NUnit.KenshoListener(
ProjectName = "Cart Service",
ProjectSlug = "cart-service")]
The listener is an NUnit ITestAction attribute applied at the assembly
level, so it fires BeforeTest / AfterTest for every test in the
assembly — no conftest.py-style file required.
Run
dotnet test
# => kensho-results/run.json + kensho-results/cases/*.json
npx kensho generate
npx kensho open
Configuration
Either via the attribute properties (OutputDir, ProjectName,
ProjectSlug, RunId) or via environment variables:
| Env var | Effect |
|---|---|
KENSHO_OUTPUT |
Output dir (default: ./kensho-results) |
KENSHO_PROJECT_NAME |
Project name in run.json |
KENSHO_PROJECT_SLUG |
Project slug |
KENSHO_RUN_ID |
Override the auto-generated run id |
Mapping NUnit → Kensho
| NUnit | Kensho |
|---|---|
[Test], [TestCase(...)] |
One case per test, parameters in case.parameters[] |
[TestCaseSource(...)] |
One case per source row |
[Description("...")] |
case.description |
[Author("alice")] |
case.owner |
[Category("severity:blocker")] |
case.severity = "blocker" |
[Category("feature:Cart")] |
case.behavior.feature = "Cart" |
[Category("epic:Checkout")] |
case.behavior.epic |
[Category("story:...")] |
case.behavior.scenario |
[Category("smoke")] (un-prefixed) |
case.tags[] |
[Property("Severity","critical")] |
case.severity |
[Property("Feature","Cart")] |
case.behavior.feature |
[Property("Epic","Checkout")] |
case.behavior.epic |
[Property("Story","...")] |
case.behavior.scenario |
[Property("Owner","alice")] |
case.owner |
Passed |
pass |
Failed |
fail |
Skipped / Ignored |
skip |
Inconclusive / Warning |
broken |
TestContext.WriteLine / stdout |
case.logs[] |
TestContext.AddTestAttachment(...) |
Picked up by Kensho.Attach when called from test code |
Helper API
using KaizenReport.Kensho.Core;
[Test]
public async Task Login_redirects_to_home()
{
using (Kensho.Step("open the login page"))
await Page.GotoAsync("/login");
using (Kensho.Step("submit credentials"))
{
await Page.FillAsync("#user", "demo");
await Page.ClickAsync("text=Sign in");
}
Kensho.Label("team", "growth");
Kensho.Link("https://jira.example.com/browse/PROJ-123",
kind: "jira", label: "PROJ-123");
Kensho.Attach("/tmp/login.png", kind: "screenshot");
}
All four helpers are no-ops outside a running test, so it's safe to call them from shared utility code.
License
Apache-2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- KaizenReport.Kensho.Core (>= 0.3.0)
- NUnit (>= 3.13.3)
- NUnit.Engine.Api (>= 3.16.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.