/quality-skills:specflow-reqnrollfrom quality-skills
Designs, implements, debugs, and migrates BDD tests on .NET using SpecFlow or its open-source successor Reqnroll. Handles Gherkin features, step definitions, and migration planning.
Ships in quality-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in BDD on .NET — historically via SpecFlow, and going forward via Reqnroll (the open-source successor maintained by the community after SpecFlow's commercial wind-down). Your goal is to help engineers run, maintain, and migrate .NET BDD suites without fabricating attribute names, NuGet package IDs, or migration tooling. When uncertain, point the reader to reqnroll.net or the archived SpecFlow docs.
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
If the file does not exist, ask: SpecFlow or Reqnroll, .NET version, test runner, current/planned reporting tool.
In 2024, Tricentis announced SpecFlow would be deprecated. Reqnroll forked SpecFlow's codebase and continues active development as an open-source project. For most teams:
Reqnroll keeps the same Gherkin features and the same [Binding] / [Given] / [When] / [Then] attribute model as SpecFlow — most existing code compiles after a namespace swap.
NuGet packages (verify current versions):
<PackageReference Include="Reqnroll" Version="<pinned-version>" />
<PackageReference Include="Reqnroll.xUnit" Version="<pinned-version>" /> <!-- or .NUnit / .MsTest -->
<PackageReference Include="Reqnroll.Tools.MsBuild.Generation" Version="<pinned-version>" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="<pinned-version>" />
<PackageReference Include="xunit" Version="<pinned-version>" />
<PackageReference Include="xunit.runner.visualstudio" Version="<pinned-version>" />
.feature files live in the test project. Reqnroll's MSBuild generator produces code-behind files at build time.
For SpecFlow, replace Reqnroll → SpecFlow in the package names; the rest is structurally identical.
# Checkout.feature
Feature: Checkout
As a registered customer
I want to complete a purchase
So that I can receive my order
Background:
Given I am signed in as a regular customer
@smoke
Scenario: Successful card purchase
Given my cart has one Widget priced at 19.99 USD
When I submit checkout with a valid card
Then the order is placed
Scenario Outline: Tax by region
Given my cart total is 100.00 USD
When I check out from <region>
Then the displayed tax is <tax>
Examples:
| region | tax |
| Oregon | 0.00 USD |
| New York | 8.875 USD |
using Reqnroll; // or TechTalk.SpecFlow for SpecFlow
using FluentAssertions;
[Binding]
public class CheckoutSteps
{
private readonly ScenarioContext _scenarioContext;
private readonly Cart _cart;
private readonly Checkout _checkout;
public CheckoutSteps(ScenarioContext scenarioContext, Cart cart, Checkout checkout)
{
_scenarioContext = scenarioContext;
_cart = cart;
_checkout = checkout;
}
[Given(@"I am signed in as a regular customer")]
public void SignedInAsCustomer() => _checkout.SignIn("[email protected]");
[Given(@"my cart has one Widget priced at ([\d.]+) USD")]
public void CartHasWidgetAt(decimal price) => _cart.Add(new Widget(), price);
[When(@"I submit checkout with a valid card")]
public void SubmitWithValidCard() => _checkout.Submit(TestCards.Valid);
[Then(@"the order is placed")]
public void OrderIsPlaced() => _checkout.LatestOrder.Should().NotBeNull();
}
Step definitions are decorated [Binding] classes. Reqnroll injects constructor dependencies — use them for shared state across step classes within a scenario.
| Mechanism | Use |
|---|---|
ScenarioContext | Per-scenario dictionary-like storage. |
FeatureContext | Per-feature storage. Avoid mutating from steps. |
| Constructor DI | Recommended pattern — Reqnroll/SpecFlow inject types you register. |
[BeforeScenario] / [AfterScenario] | Hooks. |
[BeforeTestRun] / [AfterTestRun] | Once-per-run hooks (static). |
Use constructor DI for typed state — Cart, Checkout, etc. — and ScenarioContext for ad-hoc key/value carrying within a scenario.
[Binding]
public class Hooks
{
[BeforeScenario("@auth")]
public void EnsureSignedIn(ScenarioContext context) { /* ... */ }
[AfterScenario]
public void CaptureFailure(ScenarioContext context)
{
if (context.TestError != null) { /* save artifact */ }
}
}
[Given(@"my cart total is (\d+\.\d+) (USD|EUR|CAD)")]
public void CartTotalIs(decimal total, string currency) { /* ... */ }
For typed enums / domain objects, register a [StepArgumentTransformation]:
[StepArgumentTransformation]
public Money ConvertMoney(string raw) => Money.Parse(raw);
[Given(@"my cart total is (.+)")]
public void CartTotalIs(Money total) { /* ... */ }
Cleaner step text and reusable conversion.
# xUnit
dotnet test --filter "TestCategory=smoke"
# NUnit
dotnet test --filter "Category=smoke"
Tags from @smoke become test categories in the generated test methods. The exact filter syntax varies by runner — verify against your runner's docs.
xunit.runner.visualstudio / nunit --logger junit;....For CI dashboards, JUnit XML is the lowest common denominator.
dotnet test # all tests including BDD
dotnet test --filter "Category=smoke" # tag filter
dotnet test --filter "FullyQualifiedName~Checkout" # by class name
dotnet test --logger "junit;LogFilePath=results.xml" # CI integration
Verify with dotnet test --help against your installed SDK.
Typical steps (verify against current Reqnroll migration docs):
SpecFlow.* → Reqnroll.*.TechTalk.SpecFlow → Reqnroll.specflow.json → reqnroll.json (settings file rename).For mixed migration, both packages can't coexist in the same project — migrate one project at a time.
FeatureContext mutation from steps — meant for feature-level read-only data, not scenario state.[BeforeTestRun] doing expensive setup that should be per-scenario — slow startup, leaky state.Then — localization break.When helping with SpecFlow / Reqnroll, ask:
RestSharp or HttpClient directly inside step defs.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aks-builds/quality-skills --plugin quality-skills56 skills in this plugin
/accessibility-testingWhen the user wants to design, implement, or operate accessibility (a11y) testing — automated scans, manual audits, screen-reader testing, WCAG conformance, Section 508 / EAA compliance. Use when the user mentions "accessibility," "a11y," "WCAG," "Section 508," "EAA," "ADA compliance," "axe," "axe-core," "pa11y," "Lighthouse," "aXe DevTools," "screen reader," "NVDA," "JAWS," "VoiceOver," "TalkBack," "WAVE," or "AT testing." For visual diff see visual-regression. For overall test strategy see test-strategy./ai-augmented-testingWhen the user wants to evaluate, adopt, or operate AI-augmented testing tools and approaches — autonomous test generation, self-healing locators, AI-assisted authoring, vision-based testing, agentic test runners. Use when the user mentions "AI testing," "AI-augmented testing," "Testim," "Mabl," "Functionize," "Reflect," "TestRigor," "Tricentis Copilot," "Cypress AI," "Playwright codegen with AI," "AI test generation," "self-healing tests," or "vision-based test automation." For LLM-product evals see llm-eval-testing. For overall strategy see test-strategy./appiumWhen the user wants to design, implement, debug, or scale Appium tests for iOS and Android mobile automation. Use when the user mentions "Appium," "Appium 2," "UiAutomator2," "XCUITest driver," "appium:capabilities," "AppiumServer," "accessibility id," "TouchAction," "W3C Actions," "Appium inspector," "real device cloud," or "App Center / BrowserStack / Sauce mobile." For Android-native frameworks see espresso. For iOS-native see xcuitest. For React Native specifically see detox. For YAML-driven mobile flows see maestro. For desktop web automation see selenium / playwright / webdriverio.