Repository navigation
Project Templates
Added in v2.29.17
Kronikol ships a dotnet new template pack containing 12 pre-configured project templates for all supported test frameworks. Each template creates a fully working component test project with:
- HTTP dependency tracking configured
- Report generation with diagrams
- A sample test/scenario demonstrating the complete workflow
dotnet new install Kronikol.Templates| Short Name | Framework | Description |
|---|---|---|
kronikol-xunit3 |
xUnit v3 | Component tests with xUnit v3 |
kronikol-xunit2 |
xUnit v2 | Component tests with xUnit v2 |
kronikol-tunit |
TUnit | Component tests with TUnit |
kronikol-nunit4 |
NUnit 4 | Component tests with NUnit 4 |
kronikol-mstest |
MSTest | Component tests with MSTest |
kronikol-lightbdd-xunit3 |
LightBDD + xUnit v3 | BDD-style component tests with LightBDD and xUnit v3 |
kronikol-lightbdd-xunit2 |
LightBDD + xUnit v2 | BDD-style component tests with LightBDD and xUnit v2 |
kronikol-lightbdd-tunit |
LightBDD + TUnit | BDD-style component tests with LightBDD and TUnit |
kronikol-bddfy-xunit3 |
BDDfy + xUnit v3 | BDD-style component tests with BDDfy and xUnit v3 |
kronikol-reqnroll-xunit3 |
ReqNRoll + xUnit v3 | Gherkin BDD tests with ReqNRoll and xUnit v3 |
kronikol-reqnroll-xunit2 |
ReqNRoll + xUnit v2 | Gherkin BDD tests with ReqNRoll and xUnit v2 |
kronikol-reqnroll-tunit |
ReqNRoll + TUnit | Gherkin BDD tests with ReqNRoll and TUnit |
# Create an xUnit v3 test project
dotnet new kronikol-xunit3 -n MyApi.Tests.Component
# Create with custom service names
dotnet new kronikol-xunit3 -n MyApi.Tests.Component \
--serviceName "OrderService" \
--downstreamService "PaymentGateway" \
--downstreamPort 15060
# Create a ReqNRoll project
dotnet new kronikol-reqnroll-xunit3 -n MyApi.Tests.BDDAll templates accept these parameters:
| Parameter | Default | Description |
|---|---|---|
--serviceName |
MyApi |
Name of the service under test (used in diagram labels and report titles) |
--downstreamService |
DownstreamService |
Name of a downstream dependency (used in port-to-service mapping) |
--downstreamPort |
15050 |
Port for the downstream service |
--Framework |
net10.0 |
Target framework: net10.0 from 5.0.0 (4.x also offers net8.0 and net9.0) |
From 5.0.0 every package targets net10.0 alone, so the templates offer it alone (Migrating to v5). In 4.x, from
4.14.11, a project created with --Framework net8.0 or net9.0 restores and runs: each takes the
Microsoft.AspNetCore.Mvc.Testing version for its own framework. Before 4.14.11, every template referenced the .NET 10
version, which is for net10.0 only, so those two failed to restore.
Each generated project contains:
| File | Purpose |
|---|---|
*.csproj |
Project file with all required package references |
appsettings.componenttests.json |
Configuration for downstream service URLs |
AssertionTracking.cs |
[assembly: TrackAssertions] opt-in for automatic assertion rewriting (removed in v2.37.1 — see Assertion Tracking below to opt in manually) |
Infrastructure/BaseFixture.cs |
WebApplicationFactory setup with dependency tracking (xUnit/NUnit/MSTest/TUnit) |
Infrastructure/TestRun.cs |
Report generation on test run completion |
Scenarios/SampleFeature.cs |
Working example test demonstrating assertions + HTTP calls |
Program.cs |
A marker Program class for WebApplicationFactory<Program>, with no Main; the placeholder API itself is hosted by PlaceholderApiFactory in the fixture (the hooks, for ReqNRoll; Infrastructure/BDDfyTestSetup.cs, for BDDfy), on a generic host with the test's output directory as its content root |
.claude/skills/kronikol-test-debugging/ |
The agent skill: how to debug this project's runs through kronikol query instead of opening the report (3.1.0) |
CLAUDE.md, AGENTS.md
|
Byte-identical instruction files pointing an agent at the reports directory and the skill — two names because Claude Code reads one and Codex, Cursor and Copilot read the other (3.1.0) |
For ReqNRoll templates, the structure uses Gherkin features:
| File | Purpose |
|---|---|
Features/Sample.feature |
Example Gherkin scenario |
StepDefinitions/SampleStepDefinitions.cs |
Step implementations |
Hooks/TestSetupHooks.cs |
Test lifecycle hooks with Kronikol tracking |
reqnroll.json |
ReqNRoll binding configuration |
-
Add a project reference to your API project:
<ProjectReference Include="..\YourApi\YourApi.csproj" />
-
Delete
Program.csandPlaceholderApiFactory, and point the factory at your API's ownProgram:new WebApplicationFactory<Program>(). An API written with top-level statements declaresProgramin the global namespace, and before .NET 10 needspublic partial class Program;for the test project to see it. The placeholder hosts a stand-in API with no entry point and no solution, so the sample test passes as soon as the project is created, in a solution or not (since 4.14.4; before, a test project's entry point, which is its test framework's, kept the placeholder from starting, and outside a solutionWebApplicationFactoryfound no content root). Since 4.14.11PlaceholderApiFactoryrefuses to start onceProgramis your API's, so a test cannot pass against the placeholder by mistake. -
Configure downstream services in
appsettings.componenttests.json. -
Run the sample test to verify everything works (
dotnet runfor the TUnit templates, which run on Microsoft.Testing.Platform):dotnet test -
Open the generated report at
bin/Debug/net10.0/Reports/TestRunReport.html.
The scaffolded .claude/skills/ folder and the CLAUDE.md/AGENTS.md block need nothing from you: any
agent that opens the project reads them and knows not to open the report. To add the same thing to a
repository that predates the templates, run kronikol init-agents . — see
Querying Reports § Using it from an AI agent.
v2.37.1: Assertion tracking has been removed from all dotnet templates. IL weaving can interfere with some build configurations, so assertion tracking is now an opt-in beta feature. To enable it manually, add the
Kronikol.AssertionTrackingpackage and anAssertionTracking.csfile as described below.
To opt in to assertion tracking, add the package reference to your .csproj:
<PackageReference Include="Kronikol.AssertionTracking" Version="5.*" />Then create an AssertionTracking.cs file with:
using Kronikol.Tracking;
[assembly: TrackAssertions]This means every FluentAssertions, AwesomeAssertions or TUnit assertion in the project is automatically instrumented at compile time — assertions appear as inline notes in your sequence diagrams with no manual effort. See Assertion Tracking for details.
dotnet new uninstall Kronikol.TemplatesA run reads and appends to the cross-run history ledger at
.kronikol/history.jsonl, found by walking up from the test output to the nearest .kronikol or .git
directory. Every template sets no folder path, so a project instantiated inside a repository finds its
ledger without configuration. A project instantiated outside any repository has nowhere to keep one
and records a HistoryUnavailable diagnostic naming the fix: git init, or kronikol history init,
which creates the directory and the merge=union attribute where the run will look.
Home · 🔍 Search this wiki Full-text search across every page. The “Pages” list above matches page and heading names, not page content.
Getting Started
- Quick Start (xUnit)
- Project Templates
- AI Integration Prompt
- Framework Integration Guides
- Migrating to v5
- Migrating to v4
Common Tasks
Integration Guides
- Integration xUnit3
- Integration xUnit2
- Integration NUnit
- Integration MSTest
- Integration TUnit
- Integration BDDfy xUnit3
- Integration LightBDD xUnit2
- Integration LightBDD xUnit3
- Integration LightBDD TUnit
- Integration ReqNRoll xUnit2
- Integration ReqNRoll xUnit3
- Integration ReqNRoll TUnit
- Integration Playwright
Uninstrumentable / polyglot backends
- Integration ProxyTap Extension
- Integration TcpTap Extension
- Integration Otlp Extension
- Exporting to OpenTelemetry
- Ingesting External Captures
- Ingesting from Jest
- Integration Cucumber Messages
- Capture-Time Redaction
Extensions
- Integration AtlasDataApi Extension
- Integration BigQuery Extension
- Integration Bigtable Extension
- Integration BlobStorage Extension
- Integration ClickHouse Extension
- Integration CloudStorage Extension
- Integration CosmosDB Extension
- Integration Dapper Extension
- Integration DynamoDB Extension
- Integration EF Core Relational Extension
- Integration Elasticsearch Extension
- Integration EventBridge Extension
- Integration EventHubs Extension
- Integration Grpc Extension
- Integration Kafka Extension
- Integration MassTransit Extension
- Integration MongoDB Extension
- Integration MySqlConnector Extension
- Integration Npgsql Extension
- Integration Oracle Extension
- Integration PubSub Extension
- Integration Redis Extension
- Integration S3 Extension
- Integration ServiceBus Extension
- Integration SNS Extension
- Integration Spanner Extension
- Integration SqlClient Extension
- Integration Sqlite Extension
- Integration SQS Extension
- Integration StorageQueues Extension
- Integration OpenTelemetry Extension
- Integration DispatchProxy Extension
- Integration MediatR Extension
- Integration PlantUML IKVM
Configuration
- Tracking Dependencies
- Tracking Custom Dependencies
- HTTP Tracking Setup
- Report Configuration
- Diagram Customisation
- Phase-Aware Tracking
- Content Formatting
- PlantUML Server Configuration
Features
- Generated Reports
- Report Themes
- Search and Filter Syntax
- Component Diagrams
- PlantUML Browser Rendering
- Inline SVG Rendering
- Internal Flow Tracking
- Tags and Attributes
- Excluding Requests
- Excluded Headers
- Multi-Host Test Architectures
- Event-Driven Architecture Testing
- Service Bus Tracking Patterns
- Background Thread Correlation
- Parallel-Safe Background Correlation
- Event & Message Tracking
- Assertion Tracking
- Step Tracking
- Tabular Attributes
- Large Response and Diagram Handling
- Querying Reports
- Service Card
- Cross-Run History
- Diagnostics and Debugging
- CI Summary Integration
- CI Artifact Upload
- Merging Parallel Reports
Reference