agentleFS
irahardiantoirahardianto/awesome-agv/.agents/skills/test-scenarios/SKILL.md

test-scenarios

Skill157 starsChanged 34 days agoMITView on GitHub

Systematically derives test scenarios from requirements using structured analysis and mutation-informed expansion. User-invoked entry point via /test-scenarios; not for autonomous or subagent use.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document the input source and scope boundaries

    line 34
  2. Distinctive:

    Gate: All testable behaviors extracted.

    line 84
  3. Distinctive:

    Gate: All scenarios categorized, prioritized, and assigned a test level.

    line 146
  4. Distinctive:

    Gate: Test scenario document produced.

    line 175

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test Scenario Generator

Entry-point guard: This is a user-invoked command skill (/test-scenarios). If you are a spawned subagent, do NOT execute this skill — return to your assigned scope card.

Purpose

Systematically derive test scenarios from requirements, code, or specifications. Uses a hybrid of structured derivation techniques and mutation-informed expansion to maximize coverage. Output feeds into the /test-unit, /test-integration, or /test-e2e skills after human review.

When to Use

  • Starting testing on a new feature or module
  • Comprehensive test planning before implementation
  • Auditing test completeness on existing code
  • Preparing test plans for QA handoff

When NOT to Use

  • You already have scenarios and need to write tests — use /test-unit, /test-integration, or /test-e2e directly

Phases

Phase 1: INPUT

Objective: Establish the requirements source.

  1. Accept input from one or more sources:
    • PRD / User Story — extract acceptance criteria, business rules
    • API Specification — extract endpoints, schemas, error codes
    • Existing Code — extract public API, business logic, state transitions
    • UI Designs — extract user flows, validations, navigation paths
  2. Document the input source and scope boundaries

Gate: Input source identified and accessible.

Phase 2: INVENTORY

Objective: Map all existing test coverage across the codebase.

  1. Crawl the codebase for existing tests:
    • Unit tests: Find all test files (*_test.*, *.spec.*, *.test.*). Extract test names/descriptions. Map to source modules.
    • Integration tests: Find all integration test files. Map to adapters/services under test.
    • E2E tests: Find all E2E test files. Extract journey/scenario descriptions.
  2. Produce Existing Coverage Inventory artifact as a structured table:

    Unit Tests:

    ModuleTest FileTest CountScenarios Covered
    discoveredpathcountsummary

    Integration Tests:

    AdapterTest FileTest CountScenarios Covered
    discoveredpathcountsummary

    E2E Tests:

    JourneyTest FilePlatformScenarios Covered
    discoveredpathplatformsummary
  3. Identify areas with NO test coverage — these are priority targets for scenario generation

Gate: Existing coverage inventory artifact created.

Phase 3: ANALYZE

Objective: Extract testable behaviors from requirements.

  1. For each requirement or feature, identify:
    • Actors — who triggers the behavior
    • Actions — what operations are performed
    • Inputs — data with types, ranges, and constraints
    • Outputs — responses, side effects, state changes
    • State transitions — e.g., order: pending → confirmed → shipped
    • Business rules — conditional logic, validation rules, authorization checks
    • Error conditions — invalid input, unauthorized, not found, conflict, timeout
  2. Cross-reference against Phase 2 inventory to identify gaps — behaviors with no corresponding tests

Skills to consider: sequential-thinking for complex requirement analysis

Gate: All testable behaviors extracted. Gaps against existing coverage identified.

Phase 4: DERIVE

Objective: Apply systematic test design techniques to generate scenarios.

Apply these techniques in order:

  1. Equivalence Partitioning — Group inputs into valid and invalid classes. Generate one representative test per class.
  2. Boundary Value Analysis — For each partition boundary, test: at the boundary, just inside, and just outside.
  3. Decision Table Testing — For complex conditional logic: enumerate all condition combinations and map to unique action combinations.
  4. State Transition Testing — For stateful workflows: test all valid transitions (should succeed) and all invalid transitions (should fail with appropriate error).
  5. Error Guessing — Apply common failure patterns:
    • Null, undefined, empty values
    • Concurrent access to shared resources
    • Network timeouts and partial failures
    • Resource exhaustion (disk full, memory limit)
    • Unicode, special characters, extremely long strings

Gate: Structured scenarios derived from each technique.

Phase 5: EXPAND

Objective: Mutation-informed creative expansion — generate scenarios that structured techniques miss.

For each scenario derived in Phase 4, consider these mutation categories:

Mutation TypeQuestionExample
Comparison flipWhat if < were <=?Pagination: page=0, page at exact boundary
Boolean negationWhat if this check were inverted?Auth: isAdmin check negated
Null removalWhat if null check were removed?Request without optional-but-expected field
Default swapWhat if default value differed?Timeout defaulting to 0 instead of 30s
Off-by-oneWhat if index were ±1?Array: first element, last element, one-past-end
Type coercionWhat if type were unexpected?String "0" vs integer 0 vs boolean false
Order dependencyWhat if operations ran in different order?Create-then-delete vs delete-then-create
TimingWhat if this happened concurrently?Two users updating the same resource simultaneously

Steps:

  1. For each scenario from Phase 4, apply the mutation table above
  2. Generate additional scenarios for mutations that could reveal real bugs
  3. Mark mutation-derived scenarios with Mutation: <type> in the Derivation column

Gate: Expanded scenario list with mutation-derived additions.

Phase 6: ORGANIZE

Objective: Structure scenarios into a prioritized, categorized format.

  1. Categorize each scenario:
    • Happy Path — expected successful flows
    • Edge Case — boundary and unusual-but-valid inputs
    • Error Path — expected failure conditions
    • Security/Abuse — malicious input, authorization bypass attempts
    • Performance/Stress — load, concurrency, resource limits
  2. Assign priority:
    • P0 — must test: core business logic, security, data integrity
    • P1 — should test: important edge cases, common error paths
    • P2 — nice to have: uncommon edges, cosmetic validations
    • P3 — exploratory: mutation-derived, unusual combinations
  3. Assign recommended test level:
    • Unit — pure logic, validation rules, calculations
    • Integration — adapter behavior, database queries, external service calls
    • E2E — full user journeys, cross-service flows

Gate: All scenarios categorized, prioritized, and assigned a test level.

Phase 7: OUTPUT

Objective: Produce the final scenario document and feed-ready checklists.

The output artifact contains these sections:

1. Existing Coverage Inventory

From Phase 2 — provides baseline context.

2. New Scenarios Table

IDCategoryScenarioInputExpectedPriorityLevelDerivation
S001categorydescriptioninputexpected outcomeP0–P3Unit/Int/E2Etechnique or Mutation: type

3. 🧑‍💻 Recommended Manual Testing

Scenarios requiring human judgment, physical devices, or exploratory thinking:

IDScenarioWhy ManualPriority
M001descriptionreason automation is insufficientP0–P3

4. Feed-Ready Checklists

Scenarios pre-organized as checklists for downstream skills:

  • For /test-unit: Unit-level scenarios grouped by module
  • For /test-integration: Integration-level scenarios grouped by adapter
  • For /test-e2e: E2E-level scenarios grouped by user journey

Gate: Test scenario document produced.

Persistent output: Save the test scenario document to docs/testing/test-scenarios-{feature}-{YYYY-MM-DD}.md so it can be referenced by downstream /test-unit, /test-integration, and /test-e2e skills. Create the docs/testing/ directory if it doesn't exist.

Phase 8: HUMAN REVIEW (Mandatory Gate)

This gate is mandatory. Do not feed scenarios into testing skills without user approval.

  1. Present the full Test Scenario Document to the user
  2. Highlight key metrics:
    • Total scenarios by category and priority
    • Coverage gaps discovered vs existing tests
    • Recommended manual testing scenarios
    • Suggested first batch for implementation
  3. User can:
    • Approve and select which skill to feed into (/test-unit, /test-integration, /test-e2e)
    • Adjust priorities up or down
    • Add/remove scenarios based on domain knowledge
    • Request deeper analysis on specific areas

Gate: User has reviewed and approved the scenario document.

Completion Criteria

  • Input source identified
  • Existing coverage inventory created
  • Testable behaviors extracted and gaps identified
  • Scenarios derived using structured techniques
  • Scenarios expanded with mutation-informed analysis
  • Scenarios organized by category, priority, and test level
  • Manual testing recommendations included
  • User has reviewed and approved the scenario document

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.