State Transition Testing

Generates state transition diagrams, transition matrices, and test cases from functional specifications.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/DuyITLOR/group05_eshop --skill state-transition-testing-duyitlor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: State Transition Testing
Source: https://github.com/DuyITLOR/group05_eshop/tree/main/.agents/skills/State%20Transition%20Testing
Command: npx skills add https://github.com/DuyITLOR/group05_eshop --skill state-transition-testing-duyitlor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing thorough tests for stateful features like order lifecycles is error-prone: testers often miss invalid transitions or fail to cover every state-action combination. This Skill automates the State Transition Testing technique, turning a functional specification into a complete, traceable test design. ## Core Features & Use Cases - State Transition Diagrams: Identifies states and actions from the spec and produces Mermaid stateDiagram-v2 source files plus rendered SVG/PNG images. - States x Actions Matrix: Builds a full transition table marking every valid transition and every blocked transition (e.g., HTTP 400), guaranteeing coverage of States x Actions test cases. - Test Cases & Bug Reports: Generates one detailed test case file per matrix cell, executes them against the running EShop app, updates Actual results/Status, and writes bug reports with screenshots for failures. - Use Case: Given FR-10 (order status machine with 5 states and 4 actions), the Skill produces a diagram, a 5x4 matrix, 20 test cases, executes them via the admin API, and files a bug report when a canceled order can wrongly be moved to delivered. ## Quick Start Apply state transition testing to requirement FR-10 using the README specification and generate the diagram, test design, and test cases.

Frequently Asked Questions about State Transition Testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design test cases using state transition testing?▼

Identify all states and triggering actions from the specification, draw a state transition diagram, then build a States x Actions matrix where each cell becomes exactly one test case. The total number of test cases equals the number of states multiplied by the number of actions.

What is a States x Actions matrix in software testing?▼

A States x Actions matrix is a table where rows are current states and columns are triggering actions. Each cell records the expected next state for valid transitions or a blocked result such as HTTP 400 for invalid ones, ensuring full positive and negative coverage.

When should state transition testing not be used?▼

State transition testing is unsuitable when a function has no clear states or no event-driven transitions between them, such as simple one-shot calculations. In that case the Skill reports that the technique cannot be applied and explains why.

How do I draw a state transition diagram with Mermaid?▼

Use the Mermaid stateDiagram-v2 syntax to declare states and labeled transitions between them. The Skill saves the Mermaid source as a .mermaid file and renders it to an SVG or PNG image embedded in the test design document.

How are negative test cases derived from a state machine?▼

Every cell in the matrix where a transition is not allowed becomes a negative test case. The test verifies the system rejects the action with an error such as 400 Bad Request and that the object's state remains unchanged.