docs: revamp README with feature showcase and auto-updating benchmarks#6430
Conversation
Rewrites the README around what TUnit can actually do: hero snippet with real failure output, focused object-diff example, benchmark table vs xUnit/NUnit/MSTest, and sections for mocking, shared fixtures, custom assertions, and the ASP.NET Core/Aspire/Playwright/FsCheck integrations. The benchmark table lives between <!-- benchmarks:start/end --> markers and is regenerated weekly: a new update-readme-benchmarks.js step in the speed-comparison workflow rewrites it from latest.json inside the existing automated benchmark PR.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 1 minor |
| CodeStyle | 1 minor |
🟢 Metrics 12 complexity
Metric Results Complexity 12
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Code reviewReviewed the README rewrite, the new Verification performed: cross-checked every API surface shown in the new README snippets against the actual source ( Finding:
await Assert.That(order.Items)
.HasCount(3)
.And.Contains(item => item.Sku == "ABC-123");
Everything else — the benchmark automation script, the workflow wiring ( |
HasCount(int) is [Obsolete]; showcase the recommended Count().IsEqualTo(3) path instead. Chains identically via CollectionCountEqualsAssertion.
'a fraction of a second slower' understates source-gen cost on very large suites (scales with test count). Reworded to 'pay a little up front'.
Property injection lets subclasses inherit shared fixtures without re-threading constructor parameters; note constructor injection still works.
Code review (follow-up)Re-reviewed after the four fixup commits. Diff scope: Previously flagged issue — resolved: the New finding — maintainability (minor, non-blocking):
Since this table is now stitched into the weekly automated PR with zero human review expected (per the PR description), a silent-drop failure mode is the one place this automation could quietly go stale. Two options that would close the gap:
Not a blocker for this PR — the automation as written matches today's six scenarios correctly — but worth a quick follow-up so the "never goes stale" guarantee in the PR description actually holds for future scenario additions. Everything else — the marker-replacement logic, the workflow step ordering (runs after |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e4ed6d0c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### ASP.NET Core | ||
|
|
||
| ```csharp | ||
| public class ApiFactory : TestWebApplicationFactory<Program>; |
There was a problem hiding this comment.
Use valid class declarations in integration snippets
Readers copying the new ASP.NET Core sample hit a C# syntax error here because public class ...; is not a valid class declaration; the Aspire sample below uses the same semicolon-only form. These examples need an empty body such as { } (or another valid declaration) before users can try the TUnit integration code.
Useful? React with 👍 / 👎.
Updated [TUnit](https://github.com/thomhurst/TUnit) from 1.59.0 to 1.61.15. <details> <summary>Release notes</summary> _Sourced from [TUnit's releases](https://github.com/thomhurst/TUnit/releases)._ ## 1.61.15 <!-- Release notes generated using configuration in .github/release.yml at v1.61.15 --> ## What's Changed ### Other Changes * feat: Allow disabling the automatic html report upload to upload-artifacts@v7 by @Crashdummyy in thomhurst/TUnit#6447 * fix: stop retrying artifact upload on non-retryable status codes by @thomhurst in thomhurst/TUnit#6449 ### Dependencies * chore(deps): update tunit to 1.61.0 by @thomhurst in thomhurst/TUnit#6437 * chore(deps): update verify to 31.24.3 by @thomhurst in thomhurst/TUnit#6438 * chore(deps): update dependency opentelemetry.instrumentation.aspnetcore to 1.17.0 by @thomhurst in thomhurst/TUnit#6440 * chore(deps): update verify to 31.25.0 by @thomhurst in thomhurst/TUnit#6442 * chore(deps): update dependency docusaurus-plugin-llms to ^0.5.0 by @thomhurst in thomhurst/TUnit#6443 * chore(deps): update opentelemetry to 1.17.0 by @thomhurst in thomhurst/TUnit#6441 ## New Contributors * @Crashdummyy made their first contribution in thomhurst/TUnit#6447 **Full Changelog**: thomhurst/TUnit@v1.61.0...v1.61.15 ## 1.61.0 <!-- Release notes generated using configuration in .github/release.yml at v1.61.0 --> ## What's Changed ### Other Changes * docs: revamp README with feature showcase and auto-updating benchmarks by @thomhurst in thomhurst/TUnit#6430 * docs: align docs homepage messaging with revamped README by @thomhurst in thomhurst/TUnit#6431 * fix(engine): emit ECMA-335 metadata-format type names in TestMethodIdentifierProperty by @thomhurst in thomhurst/TUnit#6433 * fix(benchmarks): make SetupTeardownTests JSON tests Native AOT compatible by @thomhurst in thomhurst/TUnit#6434 * Organize repository into conventional .NET layout by @thomhurst in thomhurst/TUnit#6435 ### Dependencies * chore(deps): update dependency polyfill to v11 by @thomhurst in thomhurst/TUnit#6418 * chore(deps): update dependency tunit.aspire to 1.6* by @thomhurst in thomhurst/TUnit#6419 * chore(deps): update tunit to 1.6* by @thomhurst in thomhurst/TUnit#6420 * chore(deps): update dependency polyfill to 11.0.1 by @thomhurst in thomhurst/TUnit#6421 * chore(deps): update dependency polyfill to 11.0.1 by @thomhurst in thomhurst/TUnit#6422 * chore(deps): update verify to 31.24.2 by @thomhurst in thomhurst/TUnit#6424 * chore(deps): update microsoft.build to 18.8.2 by @thomhurst in thomhurst/TUnit#6426 * chore(deps): update dependency microsoft.net.stringtools to 18.8.2 by @thomhurst in thomhurst/TUnit#6425 * chore(deps): update actions/setup-dotnet action to v6 by @thomhurst in thomhurst/TUnit#6427 * chore(deps): bump websocket-driver from 0.7.4 to 0.7.5 in /docs by @dependabot[bot] in thomhurst/TUnit#6429 * chore(deps): update opentelemetry to 1.17.0 by @thomhurst in thomhurst/TUnit#6432 **Full Changelog**: thomhurst/TUnit@v1.60.0...v1.61.0 ## 1.60.0 <!-- Release notes generated using configuration in .github/release.yml at v1.60.0 --> ## What's Changed ### Other Changes * feat: cross-process test report aggregation — merged HTML report + single GitHub summary by @thomhurst in thomhurst/TUnit#6415 ### Dependencies * chore(deps): update tunit to 1.59.0 by @thomhurst in thomhurst/TUnit#6398 * chore(deps): update verify to 31.24.1 by @thomhurst in thomhurst/TUnit#6399 * chore(deps): update microsoft.testing to 2.3.2 by @thomhurst in thomhurst/TUnit#6401 * chore(deps): update mstest to 4.3.2 by @thomhurst in thomhurst/TUnit#6402 * chore(deps): update actions/setup-node action to v7 by @thomhurst in thomhurst/TUnit#6403 * chore(deps): update dependency microsoft.net.test.sdk to 18.8.0 by @thomhurst in thomhurst/TUnit#6404 * chore(deps): update dependency microsoft.net.test.sdk to 18.8.1 by @thomhurst in thomhurst/TUnit#6405 * chore(deps): update dependency fsharp.core to 10.1.302 by @thomhurst in thomhurst/TUnit#6406 * chore(deps): update dependency microsoft.templateengine.authoring.cli to v10.0.302 by @thomhurst in thomhurst/TUnit#6407 * chore(deps): update dependency microsoft.entityframeworkcore to 10.0.10 by @thomhurst in thomhurst/TUnit#6410 * chore(deps): update dependency dotnet-sdk to v10.0.302 by @thomhurst in thomhurst/TUnit#6409 * chore(deps): update dependency system.commandline to 2.0.10 by @thomhurst in thomhurst/TUnit#6412 * chore(deps): update dependency microsoft.templateengine.authoring.templateverifier to 10.0.302 by @thomhurst in thomhurst/TUnit#6411 * chore(deps): update microsoft.aspnetcore to 10.0.10 by @thomhurst in thomhurst/TUnit#6413 * chore(deps): update microsoft.extensions to 10.0.10 by @thomhurst in thomhurst/TUnit#6414 * chore(deps): update microsoft.extensions to 10.8.0 by @thomhurst in thomhurst/TUnit#6416 * chore(deps): update dependency polyfill to v11 by @thomhurst in thomhurst/TUnit#6417 **Full Changelog**: thomhurst/TUnit@v1.59.0...v1.60.0 Commits viewable in [compare view](thomhurst/TUnit@v1.59.0...v1.61.15). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updated [TUnit.Core](https://github.com/thomhurst/TUnit) from 1.59.0 to 1.61.15. <details> <summary>Release notes</summary> _Sourced from [TUnit.Core's releases](https://github.com/thomhurst/TUnit/releases)._ ## 1.61.15 <!-- Release notes generated using configuration in .github/release.yml at v1.61.15 --> ## What's Changed ### Other Changes * feat: Allow disabling the automatic html report upload to upload-artifacts@v7 by @Crashdummyy in thomhurst/TUnit#6447 * fix: stop retrying artifact upload on non-retryable status codes by @thomhurst in thomhurst/TUnit#6449 ### Dependencies * chore(deps): update tunit to 1.61.0 by @thomhurst in thomhurst/TUnit#6437 * chore(deps): update verify to 31.24.3 by @thomhurst in thomhurst/TUnit#6438 * chore(deps): update dependency opentelemetry.instrumentation.aspnetcore to 1.17.0 by @thomhurst in thomhurst/TUnit#6440 * chore(deps): update verify to 31.25.0 by @thomhurst in thomhurst/TUnit#6442 * chore(deps): update dependency docusaurus-plugin-llms to ^0.5.0 by @thomhurst in thomhurst/TUnit#6443 * chore(deps): update opentelemetry to 1.17.0 by @thomhurst in thomhurst/TUnit#6441 ## New Contributors * @Crashdummyy made their first contribution in thomhurst/TUnit#6447 **Full Changelog**: thomhurst/TUnit@v1.61.0...v1.61.15 ## 1.61.0 <!-- Release notes generated using configuration in .github/release.yml at v1.61.0 --> ## What's Changed ### Other Changes * docs: revamp README with feature showcase and auto-updating benchmarks by @thomhurst in thomhurst/TUnit#6430 * docs: align docs homepage messaging with revamped README by @thomhurst in thomhurst/TUnit#6431 * fix(engine): emit ECMA-335 metadata-format type names in TestMethodIdentifierProperty by @thomhurst in thomhurst/TUnit#6433 * fix(benchmarks): make SetupTeardownTests JSON tests Native AOT compatible by @thomhurst in thomhurst/TUnit#6434 * Organize repository into conventional .NET layout by @thomhurst in thomhurst/TUnit#6435 ### Dependencies * chore(deps): update dependency polyfill to v11 by @thomhurst in thomhurst/TUnit#6418 * chore(deps): update dependency tunit.aspire to 1.6* by @thomhurst in thomhurst/TUnit#6419 * chore(deps): update tunit to 1.6* by @thomhurst in thomhurst/TUnit#6420 * chore(deps): update dependency polyfill to 11.0.1 by @thomhurst in thomhurst/TUnit#6421 * chore(deps): update dependency polyfill to 11.0.1 by @thomhurst in thomhurst/TUnit#6422 * chore(deps): update verify to 31.24.2 by @thomhurst in thomhurst/TUnit#6424 * chore(deps): update microsoft.build to 18.8.2 by @thomhurst in thomhurst/TUnit#6426 * chore(deps): update dependency microsoft.net.stringtools to 18.8.2 by @thomhurst in thomhurst/TUnit#6425 * chore(deps): update actions/setup-dotnet action to v6 by @thomhurst in thomhurst/TUnit#6427 * chore(deps): bump websocket-driver from 0.7.4 to 0.7.5 in /docs by @dependabot[bot] in thomhurst/TUnit#6429 * chore(deps): update opentelemetry to 1.17.0 by @thomhurst in thomhurst/TUnit#6432 **Full Changelog**: thomhurst/TUnit@v1.60.0...v1.61.0 ## 1.60.0 <!-- Release notes generated using configuration in .github/release.yml at v1.60.0 --> ## What's Changed ### Other Changes * feat: cross-process test report aggregation — merged HTML report + single GitHub summary by @thomhurst in thomhurst/TUnit#6415 ### Dependencies * chore(deps): update tunit to 1.59.0 by @thomhurst in thomhurst/TUnit#6398 * chore(deps): update verify to 31.24.1 by @thomhurst in thomhurst/TUnit#6399 * chore(deps): update microsoft.testing to 2.3.2 by @thomhurst in thomhurst/TUnit#6401 * chore(deps): update mstest to 4.3.2 by @thomhurst in thomhurst/TUnit#6402 * chore(deps): update actions/setup-node action to v7 by @thomhurst in thomhurst/TUnit#6403 * chore(deps): update dependency microsoft.net.test.sdk to 18.8.0 by @thomhurst in thomhurst/TUnit#6404 * chore(deps): update dependency microsoft.net.test.sdk to 18.8.1 by @thomhurst in thomhurst/TUnit#6405 * chore(deps): update dependency fsharp.core to 10.1.302 by @thomhurst in thomhurst/TUnit#6406 * chore(deps): update dependency microsoft.templateengine.authoring.cli to v10.0.302 by @thomhurst in thomhurst/TUnit#6407 * chore(deps): update dependency microsoft.entityframeworkcore to 10.0.10 by @thomhurst in thomhurst/TUnit#6410 * chore(deps): update dependency dotnet-sdk to v10.0.302 by @thomhurst in thomhurst/TUnit#6409 * chore(deps): update dependency system.commandline to 2.0.10 by @thomhurst in thomhurst/TUnit#6412 * chore(deps): update dependency microsoft.templateengine.authoring.templateverifier to 10.0.302 by @thomhurst in thomhurst/TUnit#6411 * chore(deps): update microsoft.aspnetcore to 10.0.10 by @thomhurst in thomhurst/TUnit#6413 * chore(deps): update microsoft.extensions to 10.0.10 by @thomhurst in thomhurst/TUnit#6414 * chore(deps): update microsoft.extensions to 10.8.0 by @thomhurst in thomhurst/TUnit#6416 * chore(deps): update dependency polyfill to v11 by @thomhurst in thomhurst/TUnit#6417 **Full Changelog**: thomhurst/TUnit@v1.59.0...v1.60.0 Commits viewable in [compare view](thomhurst/TUnit@v1.59.0...v1.61.15). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Summary
Rewrites the README to actually showcase TUnit, and adds automation so the new benchmark table never goes stale.
README changes
differs at memberobject diff) — all message formats verified againstTUnit.Assertions.Tests.docs/static/benchmarks/latest.json, with an honest note that source generation trades a slightly slower build for faster runs.[GenerateAssertion]), shared fixtures viaClassDataSource+IAsyncInitializer, parallelism control (DependsOn,NotInParallel,ParallelLimiter<T>), hooks, and TUnit.Mocks (previously just a table row).TUnit.FsCheckandTUnit.OpenTelemetryto the packages table; noted F#/VB.NET support.Benchmark automation
.github/scripts/update-readme-benchmarks.jsrenders the table between<!-- benchmarks:start/end -->markers fromlatest.json(skipsNAcells, fails loudly if markers vanish).speed-comparison.ymlruns it afterprocess-benchmarks.jsand includesREADME.mdin the existing weekly auto-PR, so the table refreshes with zero manual effort.Verification
HasCount(n),Contains(predicate),.Because(...),[Before(Test)],IFoo.Mock()/Returns/WasCalled(Times.Once),ClassDataSourceshared scopes,TestWebApplicationFactory<T>,AspireFixture<T>,PageTest,[FsCheckProperty].