Skip to content

docs: mention source-generated competitors in mock benchmark descriptions - #7821

Merged
thomhurst merged 1 commit into
thomhurst:mainfrom
vbreuss:docs/mock-benchmark-wording
Nov 19, 2026
Merged

thomhurst merged 1 commit into
thomhurst:mainfrom
vbreuss:docs/mock-benchmark-wording

Conversation

@vbreuss

@vbreuss vbreuss commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Imposter and Mockolate are also source-generated, so describing the comparison as TUnit.Mocks vs. runtime proxy libraries was inaccurate.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Checklist

Required

  • I have read the Contributing Guidelines
  • If this is a new feature, I started a discussion first and received agreement
  • My code follows the project's code style (modern C# syntax, proper naming conventions)
  • I have written tests that prove my fix is effective or my feature works

TUnit-Specific Requirements

  • Dual-Mode Implementation: If this change affects test discovery/execution, I have implemented it in BOTH:
    • Source Generator path (TUnit.Core.SourceGenerator)
    • Reflection path (TUnit.Engine)
  • Snapshot Tests: If I changed source generator output or public APIs:
    • I ran TUnit.Core.SourceGenerator.Tests and/or TUnit.PublicAPI tests
    • I reviewed the .received.txt files and accepted them as .verified.txt
    • I committed the updated .verified.txt files
  • Performance: If this change affects hot paths (test discovery, execution, assertions):
    • I minimized allocations and avoided LINQ in hot paths
    • I cached reflection results where appropriate
  • AOT Compatibility: If this change uses reflection:
    • I added appropriate [DynamicallyAccessedMembers] annotations
    • I verified the change works with dotnet publish -p:PublishAot=true

Testing

  • All existing tests pass (dotnet test)
  • I have added tests that cover my changes
  • I have tested both source-generated and reflection modes (if applicable)

Summary by CodeRabbit

  • Documentation
    • Updated benchmark pages to clarify that the comparisons include both source-generated and runtime proxy-based mocking libraries.
    • Revised the overview text to explicitly frame the benchmarks around TUnit.Mocks and its comparison set.
    • Applied the wording updates across all mock benchmark documentation pages for consistency.

…ions

Imposter and Mockolate are also source-generated, so describing the comparison as TUnit.Mocks vs. runtime proxy libraries was inaccurate.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T15:46:57.474273Z 0be2e22 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This pull request updates mock benchmark wording in the generator and in published benchmark pages. The text now states that TUnit.Mocks is compared against other source-generated libraries as well as runtime proxy-based libraries. No benchmark processing logic or outputs changed beyond these narrative strings.

Changes: Mock benchmark comparison wording

Layer / File(s) Summary
Generator wording updates
.github/scripts/process-mock-benchmarks.js
The generator text for category pages and the overview page now describes comparisons against other source-generated libraries and runtime proxy-based libraries, and the overview text now frames the comparison around TUnit.Mocks.
Published benchmark page wording
docs/docs/benchmarks/mocks/Callback.md, docs/docs/benchmarks/mocks/CombinedWorkflow.md, docs/docs/benchmarks/mocks/Invocation.md, docs/docs/benchmarks/mocks/MockCreation.md, docs/docs/benchmarks/mocks/Setup.md, docs/docs/benchmarks/mocks/Verification.md, docs/docs/benchmarks/mocks/index.md
The benchmark intro text and “🎯 Key Insights” text now use the same broader comparison wording on each mock benchmark page and on the overview page.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: thomhurst

Merge Risk: Minimal · up to 0be2e

This is a documentation-only wording fix that makes the benchmark descriptions accurate, since other compared libraries are also source-generated. It has no runtime impact and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says the PR mentions source-generated competitors in mock benchmark descriptions. The raw summary confirms that every changed benchmark description now compares TUnit.Mocks against other sou…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the PR mentions source-generated competitors in mock benchmark descriptions. The raw summary confirms that every changed benchmark description now compares TUnit.Mocks against other source-generated libraries as well as runtime proxy-based libraries. The PR objectives state the reason: Imposter and Mockolate are also source-generated, so the earlier wording was inaccurate. The title matches the main change. The 'docs:' prefix correctly marks it as a documentation-only change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Rabbit paws tap soft on the page,
Fresh benchmark words step onto the stage.
TUnit.Mocks now names the full race,
With source-made friends in the same warm space.
I nibble a carrot and tidy the prose,
Then hop down the docs where clarity grows.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7742efdc-b43a-4782-bb20-65cc2c0276b9
Commits

Reviewing files that changed from the base of the PR and between 89e53a4 and 0be2e22.

Files selected for processing: 8

  • .github/scripts/process-mock-benchmarks.js
  • docs/docs/benchmarks/mocks/Callback.md
  • docs/docs/benchmarks/mocks/CombinedWorkflow.md
  • docs/docs/benchmarks/mocks/Invocation.md
  • docs/docs/benchmarks/mocks/MockCreation.md
  • docs/docs/benchmarks/mocks/Setup.md
  • docs/docs/benchmarks/mocks/Verification.md
  • docs/docs/benchmarks/mocks/index.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Review: looks good.

The wording change is accurate, since Imposter and Mockolate are source-generated. I confirmed that the generator template in process-mock-benchmarks.js (3 spots) and the 7 generated docs under docs/docs/benchmarks/mocks/ were updated the same way. No old "runtime proxy-based"-only wording remains. Updating the generated docs by hand as well means they won't be stale until the next CI run regenerates them.

Optional nit: the new phrasing is repeated in several template literals. A small shared constant (e.g. const comparisonPhrase = 'other source-generated and runtime proxy-based mocking libraries') would stop them drifting apart. That is not blocking.

No code or behaviour changes, so no tests are needed.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This wording-only change appears safe to merge.

Summary

Clarifies that the mock benchmarks compare TUnit.Mocks with both source-generated and runtime proxy-based libraries.

  • Mock benchmark pages describe both source-generated and runtime-proxy comparisons.

No actionable issues found.

Reviews (2) · Last reviewed commit: "docs: mention source-generated competito..." · Reviewed by Greptile

@thomhurst

Copy link
Copy Markdown
Owner

Thanks @vbreuss

@thomhurst
thomhurst merged commit bddb7b7 into thomhurst:main Nov 19, 2026
4 checks passed
This was referenced Nov 19, 2026
github-actions Bot pushed a commit to BenjaminMichaelis/TrxLib that referenced this pull request Nov 23, 2026
Updated [TUnit](https://github.com/thomhurst/TUnit) from 1.85.0 to
1.87.12.

<details>
<summary>Release notes</summary>

_Sourced from [TUnit's
releases](https://github.com/thomhurst/TUnit/releases)._

## 1.87.12

<!-- Release notes generated using configuration in .github/release.yml
at v1.87.12 -->

## What's Changed
### Other Changes
* ci: keep the pipeline run report and cache Playwright browsers by
@​thomhurst in thomhurst/TUnit#7813
* docs: mention source-generated competitors in mock benchmark
descriptions by @​vbreuss in
thomhurst/TUnit#7821
* perf(mocks): reduce setup allocations and fixed-return overhead by
@​thomhurst in thomhurst/TUnit#7827
* fix(mocks): preserve nullable base-class constraints by @​thomhurst in
thomhurst/TUnit#7829
* fix(mocks): reduce allocations, bound benchmarks, and clear test
warnings by @​thomhurst in thomhurst/TUnit#7831
* perf(mocks): read the latest capture without allocating by @​thomhurst
in thomhurst/TUnit#7832
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7814
* chore(deps): update dependency masstransit to 9.3.0 by @​thomhurst in
thomhurst/TUnit#7816
* chore(deps): update dependency microsoft.playwright to 1.65.1 by
@​thomhurst in thomhurst/TUnit#7817
* chore(deps): update dependency mockolate to 4.2.0 by @​thomhurst in
thomhurst/TUnit#7819
* chore(deps): update all non-major dependencies to 33.7.0 by
@​thomhurst in thomhurst/TUnit#7826


**Full Changelog**:
thomhurst/TUnit@v1.87.0...v1.87.12

## 1.87.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.87.0 -->

## What's Changed
### Other Changes
* docs: fix the contribution guide link in the TUnit.Core readme by
@​farisbasha in thomhurst/TUnit#7806
* fix(aspire): support AddDotnetProject resources in AspireFixture by
@​thomhurst in thomhurst/TUnit#7812
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7807

## New Contributors
* @​farisbasha made their first contribution in
thomhurst/TUnit#7806

**Full Changelog**:
thomhurst/TUnit@v1.86.6...v1.87.0

## 1.86.6

<!-- Release notes generated using configuration in .github/release.yml
at v1.86.6 -->

## What's Changed
### Other Changes
* feat: convert string [Arguments] to CultureInfo, Uri and Version by
@​thomhurst in thomhurst/TUnit#7800
* fix(assertions): treat the same instance as equivalent in
IsEquivalentTo by @​mohsinaliwork686-rgb in
thomhurst/TUnit#7799
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7797
* chore(deps): update dependency verify.tool to v1 by @​thomhurst in
thomhurst/TUnit#7803
* chore(deps): update dependency mockolate to 4.1.1 by @​thomhurst in
thomhurst/TUnit#7802

## New Contributors
* @​mohsinaliwork686-rgb made their first contribution in
thomhurst/TUnit#7799

**Full Changelog**:
thomhurst/TUnit@v1.86.0...v1.86.6

## 1.86.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.86.0 -->

## What's Changed
### Other Changes
* fix(assertions): keep the awaited value and drill-ins after Because by
@​JohnVerheij in thomhurst/TUnit#7788
* fix(assertions)!: collection checks no longer chain without And/Or by
@​thomhurst in thomhurst/TUnit#7791
* test: fix flaky owner-collection check in ExternalObjectOwnershipTests
by @​thomhurst in thomhurst/TUnit#7794
* fix(assertions): keep a value-type result of AssertionResult<T> as T
by @​JohnVerheij in thomhurst/TUnit#7793
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7790


**Full Changelog**:
thomhurst/TUnit@v1.85.7...v1.86.0

## 1.85.7

<!-- Release notes generated using configuration in .github/release.yml
at v1.85.7 -->

## What's Changed
### Other Changes
* fix: read custom data source row metadata without reflection in
source-generated mode by @​thomhurst in
thomhurst/TUnit#7784
### Dependencies
* chore(deps): update all non-major dependencies to 1.85.0 by
@​thomhurst in thomhurst/TUnit#7777
* chore(deps): update dependency coverlet.collector to 10.1.1 by
@​thomhurst in thomhurst/TUnit#7780
* chore(deps): update all non-major dependencies to 33.5.0 by
@​thomhurst in thomhurst/TUnit#7783


**Full Changelog**:
thomhurst/TUnit@v1.85.0...v1.85.7

Commits viewable in [compare
view](thomhurst/TUnit@v1.85.0...v1.87.12).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=TUnit&package-manager=nuget&previous-version=1.85.0&new-version=1.87.12)](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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to IntelliTect/CodingGuidelines that referenced this pull request Nov 23, 2026
Updated [TUnit.Core](https://github.com/thomhurst/TUnit) from 1.85.7 to
1.87.12.

<details>
<summary>Release notes</summary>

_Sourced from [TUnit.Core's
releases](https://github.com/thomhurst/TUnit/releases)._

## 1.87.12

<!-- Release notes generated using configuration in .github/release.yml
at v1.87.12 -->

## What's Changed
### Other Changes
* ci: keep the pipeline run report and cache Playwright browsers by
@​thomhurst in thomhurst/TUnit#7813
* docs: mention source-generated competitors in mock benchmark
descriptions by @​vbreuss in
thomhurst/TUnit#7821
* perf(mocks): reduce setup allocations and fixed-return overhead by
@​thomhurst in thomhurst/TUnit#7827
* fix(mocks): preserve nullable base-class constraints by @​thomhurst in
thomhurst/TUnit#7829
* fix(mocks): reduce allocations, bound benchmarks, and clear test
warnings by @​thomhurst in thomhurst/TUnit#7831
* perf(mocks): read the latest capture without allocating by @​thomhurst
in thomhurst/TUnit#7832
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7814
* chore(deps): update dependency masstransit to 9.3.0 by @​thomhurst in
thomhurst/TUnit#7816
* chore(deps): update dependency microsoft.playwright to 1.65.1 by
@​thomhurst in thomhurst/TUnit#7817
* chore(deps): update dependency mockolate to 4.2.0 by @​thomhurst in
thomhurst/TUnit#7819
* chore(deps): update all non-major dependencies to 33.7.0 by
@​thomhurst in thomhurst/TUnit#7826


**Full Changelog**:
thomhurst/TUnit@v1.87.0...v1.87.12

## 1.87.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.87.0 -->

## What's Changed
### Other Changes
* docs: fix the contribution guide link in the TUnit.Core readme by
@​farisbasha in thomhurst/TUnit#7806
* fix(aspire): support AddDotnetProject resources in AspireFixture by
@​thomhurst in thomhurst/TUnit#7812
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7807

## New Contributors
* @​farisbasha made their first contribution in
thomhurst/TUnit#7806

**Full Changelog**:
thomhurst/TUnit@v1.86.6...v1.87.0

## 1.86.6

<!-- Release notes generated using configuration in .github/release.yml
at v1.86.6 -->

## What's Changed
### Other Changes
* feat: convert string [Arguments] to CultureInfo, Uri and Version by
@​thomhurst in thomhurst/TUnit#7800
* fix(assertions): treat the same instance as equivalent in
IsEquivalentTo by @​mohsinaliwork686-rgb in
thomhurst/TUnit#7799
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7797
* chore(deps): update dependency verify.tool to v1 by @​thomhurst in
thomhurst/TUnit#7803
* chore(deps): update dependency mockolate to 4.1.1 by @​thomhurst in
thomhurst/TUnit#7802

## New Contributors
* @​mohsinaliwork686-rgb made their first contribution in
thomhurst/TUnit#7799

**Full Changelog**:
thomhurst/TUnit@v1.86.0...v1.86.6

## 1.86.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.86.0 -->

## What's Changed
### Other Changes
* fix(assertions): keep the awaited value and drill-ins after Because by
@​JohnVerheij in thomhurst/TUnit#7788
* fix(assertions)!: collection checks no longer chain without And/Or by
@​thomhurst in thomhurst/TUnit#7791
* test: fix flaky owner-collection check in ExternalObjectOwnershipTests
by @​thomhurst in thomhurst/TUnit#7794
* fix(assertions): keep a value-type result of AssertionResult<T> as T
by @​JohnVerheij in thomhurst/TUnit#7793
### Dependencies
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7790


**Full Changelog**:
thomhurst/TUnit@v1.85.7...v1.86.0

Commits viewable in [compare
view](thomhurst/TUnit@v1.85.7...v1.87.12).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=TUnit.Core&package-manager=nuget&previous-version=1.85.7&new-version=1.87.12)](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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants