Loading...
Loading...
Analyzes test suites and tags each test with a standardized set of traits (e.g., positive, negative, critical-path, boundary, smoke, regression). Use when the user wants to categorize, audit, or label tests with traits. Do not use for writing new tests, running tests, or migrating test frameworks.
npx skill4agent add dotnet/skills test-taggingwriting-mstest-testsrun-tests| Input | Required | Description |
|---|---|---|
| Test project or files | Yes | Path to the test project, folder, or specific test files to analyze |
| Scope | No | |
| Framework | No | Auto-detected. Override with |
| Trait Value | Meaning | Heuristics |
|---|---|---|
| Verifies expected behavior under normal/valid conditions | Asserts success, valid output, expected state, no exceptions for valid input |
| Verifies correct handling of invalid input, errors, or edge cases | Asserts exceptions, error codes, validation failures, rejects bad input |
| Tests limits, thresholds, empty/null inputs, min/max values | Operates on |
| Core workflow that must never break; breakage blocks users | Tests the primary success scenario of a key public API or user-facing feature |
| Quick sanity check that the system is operational | Fast, no complex setup, verifies basic wiring (e.g., service resolves, endpoint returns 200) |
| Reproduces a specific previously-reported bug | References a bug ID, issue number, or describes a fix in its name or comments |
| Crosses process, network, or persistence boundaries | Uses real database, HTTP client, file system, external service, or multi-component setup |
| Full user workflow spanning the entire application stack | Exercises a complete scenario from entry point to final result, distinct from single-boundary |
| Validates timing, throughput, or resource consumption | Asserts on elapsed time, memory, allocations, or uses benchmark harness |
| Verifies authentication, authorization, input sanitization, or secrets handling | Tests for SQL injection, XSS, CSRF, unauthorized access, token validation, permission checks |
| Validates thread safety, parallelism, or async correctness | Uses |
| Tests retry logic, timeouts, circuit breakers, or graceful degradation | Asserts behavior under transient failures, network drops, or service unavailability (e.g., Polly policies) |
| Mutates shared or external state that is hard to roll back | Deletes records, drops resources, modifies global config -- useful for CI isolation decisions |
| Verifies settings loading, defaults, environment behavior | Tests missing config keys, invalid values, environment variable fallbacks, options validation |
| Known to intermittently fail (meta-tag for test health tracking) | Mark tests the team knows are unreliable; used to quarantine or prioritize stabilization |
negativeboundarypositivenegativedotnet-test-frameworks| Framework | Existing Attribute | Example |
|---|---|---|
| MSTest | | |
| xUnit | | |
| NUnit | | |
InvalidFailErrorThrowRejectBadInputNullNegativenegativeAssert.ThrowsExceptionAssert.ThrowsShould().Throw()negativenull""0-1int.MaxValueint.MinValueboundarysmokeintegrationregressionStopwatchBenchmarkDotNetperformancecritical-pathsecurityTask.WhenAllParallel.ForEachSemaphoreSlimConcurrentDictionaryconcurrencyresiliencedestructiveend-to-endconfiguration[Ignore][Skip]flakypositivepositivenegativepositivenegative[TestMethod]
[TestCategory("negative")]
[TestCategory("boundary")]
public void Parse_NullInput_ThrowsArgumentNullException() { ... }[Fact]
[Trait("Category", "positive")]
[Trait("Category", "critical-path")]
public void CreateOrder_ValidItems_ReturnsConfirmation() { ... }[Test]
[Category("regression")]
[Category("negative")]
public void Calculate_OverflowInput_ReturnsError() // Fix for #1234
{ ... }## Trait Distribution
| Trait | Count | % of Total |
|---------------|-------|------------|
| positive | 42 | 53.8% |
| negative | 22 | 28.2% |
| boundary | 8 | 10.3% |
| critical-path | 12 | 15.4% |
| smoke | 3 | 3.8% |
| regression | 5 | 6.4% |
| integration | 4 | 5.1% |
| end-to-end | 2 | 2.6% |
| performance | 1 | 1.3% |
| security | 3 | 3.8% |
| concurrency | 2 | 2.6% |
| resilience | 1 | 1.3% |
| destructive | 1 | 1.3% |
| configuration | 2 | 2.6% |
| flaky | 1 | 1.3% |
| **Total tests** | **78** | -- |
Note: Percentages exceed 100% because tests can have multiple traits.positivenegativedotnet build| Pitfall | Solution |
|---|---|
| Guessing traits without reading the test body | Always read assertions and setup to classify accurately |
Tagging a test only as | Every test should also be |
Using | Match the attribute style to the detected framework |
| Duplicating an existing category attribute | Check for pre-existing traits in Step 2 before adding |
Over-tagging as | Reserve for tests on primary public entry points, not every helper |