bunit-test-migration

bunit-test-migration is a skill for Claude Code, Codex from FritzAndFriends/BlazorWebFormsComponents. It costs 67 tokens per session (1,587 once invoked), scanned A, original, MIT.

A guide for updating bUnit test files from an old beta API to the stable bUnit 2.x API. It replaces outdated base classes, wrappers, test methods, and component-rendering patterns.

In plain words
What is it for?
Use it when .razor test files contain patterns such as TestComponentBase, Fixture, or SnapshotTest and need to be converted to bUnit 2.x.
Why use it?
It removes compatibility problems caused by obsolete test syntax and brings existing component tests onto the supported bUnit version.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when .razor test files contain patterns such as TestComponentBase, Fixture, or SnapshotTest and need to be converted to bUnit 2.x.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add FritzAndFriends/BlazorWebFormsComponents --skill bunit-test-migration
Clone the repo
git clone --depth 1 https://github.com/FritzAndFriends/BlazorWebFormsComponents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bunit-test-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration/github.svg)](https://agentmods.dev/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration)
Your own site
<a href="https://agentmods.dev/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration"><img src="https://agentmods.dev/badge/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bunit-test-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration"><img src="https://agentmods.dev/badge/skills/fritzandfriends/blazorwebformscomponents/bunit-test-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,587 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01587
Opus 5.5 $0.00027 $0.00635
Sonnet 5.5 $0.00013 $0.00317
Haiku 4.5 $0.00007 $0.00159

Measured 3mo ago against content hash aafc1e6b37d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bunit-test-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/bunit-test-migration/SKILL.md · 269 lines

How it starts

The opening of the file, as written. The whole thing — 269 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bUnit Test Migration Skill (Beta → 2.x)

This skill provides guidance for migrating test files from the deprecated bUnit 1.0.0-beta-10 API to bUnit 2.5.3 stable API. Use this when you encounter test files using the old TestComponentBase, <Fixture>, or <SnapshotTest> patterns.

When to Apply

Apply this skill when a .razor test file contains any of these patterns:

  • @inherits TestComponentBase
  • <Fixture Test="...">
  • <ComponentUnderTest>
  • <SnapshotTest>
  • void MethodName(Fixture fixture)

Transformation Rules

1. Change Inheritance

- @inherits TestComponentBase
+ @inherits BunitContext

2. Remove Wrapper Elements

Remove these XML elements entirely (keep only the component inside):

- <Fixture Test="TestName">
-     <ComponentUnderTest>
          <MyComponent Parameter="value" />
-     </ComponentUnderTest>
- </Fixture>

3. Convert Test Methods

- void TestMethodName(Fixture fixture)
+ [Fact]
+ public void ComponentName_Scenario_ExpectedResult()

4. Replace Component Access

- var cut = fixture.GetComponentUnderTest();
+ var cut = Render(@<MyComponent Parameter="value" />);

5. Convert Snapshot Tests

- <SnapshotTest Description="renders correctly">
-     <TestInput>
-         <MyComponent />
-     </TestInput>
-     <ExpectedOutput>
-         <div>expected html</div>
-     </ExpectedOutput>
- </SnapshotTest>
+ [Fact]
+ public void MyComponent_Default_RendersCorrectly()
+ {
+     var cut = Render(@<MyComponent />);
+     cut.MarkupMatches(@<div>expected html</div>);
+ }

Complete Example

Before

@inherits TestComponentBase

<Fixture Test="ShouldClickButton">
    <ComponentUnderTest>
        <Button OnClick="OnClick">Click me</Button>
    </ComponentUnderTest>
</Fixture>

@code {
    int ClickCount = 0;

    void ShouldClickButton(Fixture fixture)
    {
        var cut = fixture.GetComponentUnderTest();

        cut.Find("button").Click();

        ClickCount.ShouldBe(1);
    }

    void OnClick() => ClickCount++;
}

Read the full file on GitHub · 269 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 269 lines · 67 tokens per session scan A aafc1e6b37d0

Subscribe to this mod's changes

bunit-test-migration is a skill published in the GitHub repository FritzAndFriends/BlazorWebFormsComponents (454 stars, last pushed 5mo ago), licensed MIT. It adds 67 tokens to every session and 1,587 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

bunit-test-migration compared with skills from other repositories

bunit-test-migration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bunit-test-migrationFritzAndFriends/BlazorWebFormsComponentsSkill4545mo agoMITA67Claude Code, Codex
lumeoBrain2k-0005/LumeoSkill248d agoMITA133Claude Code, Codex
author-testAzure/azure-sdk-for-netSkill6.1ktodayMITA68Claude Code, Codex
migrate-mstest-v1v2-to-v3dotnet/skillsSkill6.4ktodayMITA193Claude Code
migrate-mstest-v3-to-v4dotnet/skillsSkill6.4ktodayMITA217Claude Code
migrate-xunit-to-xunit-v3dotnet/skillsSkill6.4ktodayMITA149Claude Code
writing-mstest-testsdotnet/skillsSkill6.4ktodayMITA179Claude Code