Test Analysis Extensions
.NET (Microsoft)OfficialPublished by .NET (Microsoft)
- Skill
- Meta (authoring, orchestration, planning, memory)
- Agent tooling
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Test Analysis Extensions is a non-invocable data repository designed for internal use by other test-related agent skills. It provides structured reference files for various programming languages and their respective testing frameworks. These files contain essential metadata for identifying test markers, assertion APIs, lifecycle hooks, and anti-pattern indicators, enabling analysis agents to perform language-neutral evaluations across diverse codebases.
What it does
- Provides standardized lookup tables for test framework syntax and conventions.
- Maps language-specific features like setup/teardown hooks and skip annotations.
- Defines capability support levels for automated tagging and reporting.
- Enables consistent detection of mystery guest indicators and integration markers.
- Supports cross-language analysis by normalizing test-related concepts.
When to use it
- When building or maintaining test analysis agents that require framework-specific knowledge.
- When an agent needs to identify test lifecycle methods or assertion patterns in a specific language.
- When determining if a test suite supports automated tagging or requires report-only auditing.
Advantages
- Decouples analysis logic from framework-specific implementation details.
- Ensures consistent detection patterns across multiple programming languages.
- Provides clear capability definitions for automated test manipulation.
- Facilitates easier extension of analysis agents to new languages or frameworks.
Usage examples
- “N/A - This is a reference-only skill for internal agent use.”
- The agent automatically reads the relevant language file (e.g., python.md) to identify pytest fixtures and markers during analysis.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/dotnet/test-analysis-extensions/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip test-analysis-extensions.zip -d .agents/skills
Documentation by .NET (Microsoft)
Test Analysis Extensions
This reference-only catalog lists the bundled files used by test analysis.
Consumers read the matching file directly; disable-model-invocation: true
means this catalog must not be invoked through the model's skill tool.
Resolve these resource paths relative to this catalog, not the project workspace.
Available Extension Files
| File | Languages / Frameworks | Contents |
|---|---|---|
| extensions/dotnet.md | .NET (C#/F#/VB) — MSTest, xUnit, NUnit, TUnit | Test markers, assertion APIs, sleep/delay patterns, skip annotations, mystery guest, integration markers, setup/teardown, tag support |
| extensions/python.md | Python — pytest, unittest | Same categories, with pytest fixtures/markers and unittest TestCase |
| extensions/typescript.md | TypeScript / JavaScript — Jest, Vitest, Mocha, Jasmine, node:test | Same categories, with async/await pitfalls |
| extensions/java.md | Java — JUnit 4, JUnit 5 (Jupiter), TestNG | Same categories, with @Tag / @Category / groups |
| extensions/go.md | Go — testing package, testify | Same categories, with table-driven idiom and build tags |
| extensions/ruby.md | Ruby — RSpec, Minitest | Same categories, with RSpec metadata and Minitest tags |
| extensions/rust.md | Rust — built-in #[test], cargo test | Same categories, with #[ignore], #[should_panic], feature flags |
| extensions/swift.md | Swift — XCTest, Swift Testing | Same categories, with @Test, @Tag, @Suite |
| extensions/kotlin.md | Kotlin — JUnit 5, Kotest, MockK | Same categories, with @Tag and Kotest tags |
| extensions/powershell.md | PowerShell — Pester v5 | Same categories, with -Tag and Skip |
| extensions/cpp.md | C++ — GoogleTest, Catch2, doctest | Same categories, with [tags] and * filters |
Usage
Detect the target codebase's primary language and test framework.
Read the matching extension file before performing analysis.
If multiple test frameworks are present (e.g., a project mixing Jest and Mocha), read all relevant extensions.
Each extension file documents the same categories so analysis skills can be language-neutral.
Capability tags
Each extension file declares per-capability support so skills can gate behaviour safely:
Test discovery — how to locate test files and methods.
Assertion detection — framework-specific and language-level assertion forms.
Sleep/delay patterns — synchronous and asynchronous waits.
Skip / ignore — how to recognize skipped/ignored tests.
Setup / teardown — fixture and lifecycle hooks.
Mystery guest indicators — common file/db/network/env coupling patterns.
Integration markers — conventions that mark a test as integration/E2E.
Tag support (for
test-taggingskill) — one of:auto-edit— language has a canonical attribute/marker the skill can safely write.report-only— no canonical syntax; produce audit reports without edits.convention-based— tags exist via name/comment conventions only.
Notes for skill authors
Treat extension files as data, not as guidance to follow verbatim. They tell skills how to detect things in each language, not what to think about findings.
When language detection is uncertain, prefer reading multiple extension files over guessing.
If the user explicitly names a framework that does not have an extension file yet, fall back to the closest one (e.g., Pest → python.md/pytest semantics) and note the gap in the report.
Files
- ATTRIBUTION.mdAdded by AutoGineer859 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md4.6 KiB
- extensions/cpp.md8.4 KiB
- extensions/dotnet.md6.7 KiB
- extensions/go.md7.4 KiB
- extensions/java.md7.5 KiB
- extensions/kotlin.md7.2 KiB
- extensions/powershell.md6.3 KiB
- extensions/python.md6.8 KiB
- extensions/ruby.md6.6 KiB
- extensions/rust.md7.2 KiB
- extensions/swift.md6.8 KiB
- extensions/typescript.md7.4 KiB
extensions/ruby.md
Ruby Test Frameworks Reference (RSpec, Minitest)
Reference data for analyzing Ruby test code. Used by the polyglot test analysis skills.
Capability tags
| Capability | Support |
|---|---|
| Test discovery | Strong — spec/**/*_spec.rb, test/**/*_test.rb |
| Assertion detection | Strong — expect, assert_* |
| Sleep/delay detection | Strong — sleep, Kernel#sleep |
| Skip/ignore detection | Strong — skip, pending, xit |
| Setup/teardown detection | Strong — before, setup |
| Tag support | auto-edit — RSpec metadata, Minitest tag (via gems) |
Test File Identification
| Framework | File convention | Test method markers |
|---|---|---|
| RSpec | spec/**/*_spec.rb | describe, context, it, specify, example |
| Minitest | test/**/*_test.rb | Minitest::Test subclass with methods starting test_, or Minitest::Spec with it |
Assertion APIs
| Category | RSpec (expect) | Minitest (assert_*) |
|---|---|---|
| Equality | expect(x).to eq(y) / eql(y) | assert_equal expected, actual |
| Identity | expect(x).to be(y) | assert_same expected, actual |
| Boolean | expect(x).to be_truthy / be_falsey | assert x / refute x |
| Nil | expect(x).to be_nil | assert_nil x / refute_nil x |
| Exception | expect { fn }.to raise_error(SomeError, /msg/) | assert_raises(SomeError) { fn } |
| Type | expect(x).to be_a(T) / be_instance_of(T) | assert_kind_of T, x / assert_instance_of T, x |
| Membership | expect(arr).to include(item) | assert_includes arr, item |
| String | expect(s).to match(/regex/) | assert_match(/regex/, s) |
| Predicate | expect(x).to be_empty (auto: x.empty?) | assert_empty x |
| Change | expect { code }.to change(obj, :attr).from(x).to(y) | manual before/after assertion |
| Throw | expect { throw :sym }.to throw_symbol(:sym) | assert_throws(:sym) { ... } |
| Output | expect { puts "x" }.to output("x\n").to_stdout | assert_output("x\n") { puts "x" } |
| Fail | fail("reason") (built-in) | flunk "reason" |
Third-party libraries: Shoulda Matchers, FactoryBot (for setup, not assertions), Capybara (have_content, have_selector).
Sleep/Delay Patterns
| Pattern | Example |
|---|---|
| Sleep | sleep 1 / sleep(0.5) |
| Capybara explicit wait (acceptable) | using_wait_time(5) { find('#x') } |
| Loop wait | until condition; sleep 0.1; end |
| Timecop / ActiveSupport::Testing::TimeHelpers (acceptable) | travel_to(1.hour.from_now) instead of real sleep |
Skip/Ignore Annotations
| Framework | Skip |
|---|---|
| RSpec | skip("reason"), xit, xdescribe, xcontext, pending("reason"), it("...", :skip), it("...", skip: "reason"), focused fit, fdescribe, fcontext |
| Minitest | skip("reason") inside a test method, skip_until "<date>", "reason" (via minitest-skip-until gem) |
fit / fdescribe (focused) committed to source is anti-pattern when --fail-if-no-examples / RSpec --only-failures isn't gating it.
Exception Handling — Idiomatic Alternatives
# RSpec (preferred):
expect { service.place_order(empty_order) }
.to raise_error(InvalidOrderError, /at least one item/)
# Minitest:
err = assert_raises(InvalidOrderError) { service.place_order(empty_order) }
assert_match(/at least one item/, err.message)Flag tests with bare begin/rescue that swallow exceptions or rescue => e patterns without subsequent assertion.
Mystery Guest — Common Ruby/Rails Patterns
| Indicator | What to look for |
|---|---|
| File system | File.read, File.open, Pathname#read, hard-coded paths |
| Database | direct ActiveRecord::Base.connection.execute, real DB writes outside transactional fixtures |
| Network | Net::HTTP, URI.open, RestClient, Faraday against real URLs |
| Environment | ENV["X"] (especially without ENV.fetch("X", default)) |
| Acceptable | WebMock, VCR, Tempfile, StringIO, ActiveRecord transactional fixtures, database_cleaner, factory builders |
Integration Test Markers
Folder convention:
spec/system/,spec/features/,spec/integration/,test/integration/,test/system/RSpec metadata:
it "...", type: :system,:feature,:request,:integrationRails:
ActionDispatch::IntegrationTestsubclass,ActionDispatch::SystemTestCaseCapybara involvement implies system/feature test
Setup/Teardown
| Framework | Per-test | Per-suite |
|---|---|---|
| RSpec | before(:each) / before { ... } | before(:all) / before(:context) |
| RSpec | after(:each) | after(:all) |
| RSpec | `around { | ex |
| Minitest | setup method | before_all (via minitest-hooks gem) |
| Minitest | teardown method | after_all (via gem) |
| Rails | ActiveSupport::TestCase setup / teardown blocks | setup do ... end |
Tag/Trait Attributes (for test-tagging)
| Framework | Tag mechanism | Example |
|---|---|---|
| RSpec | metadata hash | it "creates order", :positive, :critical_path do ... end |
| RSpec | metadata key/value | describe Order, type: :model, tag: :positive do ... end |
| Minitest | tag via minitest-tagz / minitest-tagged gems | varies by gem |
| Rails | test_tagged helper (Rails 7.1+) | test "x", tag: :positive do ... end |
RSpec filters can drive tag selection: rspec --tag positive, rspec --tag ~slow.
Language-specific calibration notes
Predicate matchers (
be_empty,be_valid) auto-derive from?methods on the object. Treat as state/side-effect assertions.changematcher is a state assertion:expect { code }.to change(obj, :attr)verifies side effects. Do not treat as missing assertion.Shared examples (
it_behaves_like "...")and shared contexts are NOT duplicate tests — they are the consolidated form.let/let!for fixtures:let!runs eagerly per test,letlazily. Tests that create heavylet!blocks for fields used by only one test are General Fixture smells.Implicit subject (
subject { described_class.new(args) },it { is_expected.to be_valid }) is a valid concise form.FactoryBot
buildvscreate:createhits the database,builddoes not. Tests thatcreaterecords for assertions that don't need persistence inflate test time — note but don't flag as critical.Capybara
findwithout an explicit selector can be slow/flaky; recommend more specific selectors.RSpec
pendingdiffers fromskip:pendingruns the test and expects failure;skipdoes not run it.
Requirements and compatibility
Written for: Claude Code
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Claude Code frontmatter, Needs Python, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- .NET (Microsoft)
- Publisher
- .NET (Microsoft) (Official)
- Source
- dotnet/skills · plugins/dotnet-test/skills/test-analysis-extensions · commit 96c3d68
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by .NET (Microsoft) or .NET (Microsoft).
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download test-analysis-extensions.zip