Skill to intelligently generate test cases — both from documents (pre-dev) and from direct browser exploration (post-dev).
Mode Detection
Determine the mode based on user input:
| Input Scenario | Mode |
|---|---|
| User provides a PRD / user story / document / specification text WITHOUT a URL | Mode 1 — Pre-Dev |
| User provides a URL (with or without a document) | Mode 2 — Post-Dev |
| User provides 2 test case files / asks for a "gap report" / "compare" | Mode 3 — Gap Only |
User provides a URL AND there is already qa-spec-*.json in the folder |
Mode 2 + auto Gap Report |
| User provides nothing / ambiguous | Ask: "Do you have a PRD document, an application URL, or both?" |
Important note: If the user only mentions a feature/flow without a document and without a URL (e.g.: "create test cases for login"), first ask whether there is a document or URL. Do not assume.
Mode 1 — Pre-Dev (Document → @unverified Test Case)
Enable when the input is a document/specification text without a URL.
Read the complete instructions from:
@references/mode-predev.md
Output: File .feature with tag @unverified + file qa-spec-[nama].json.
Mode 2 — Post-Dev (URL → Browser Exploration → @verified Test Case)
Enable when the input contains a URL that can be opened in a browser.
Read the complete instructions from:
@references/mode-postdev.md
Output: File .feature with tag @verified + update/create qa-spec-[nama].json.
Automatic bonus: If there is qa-spec-*.json from Mode 1, automatically add a gap report.
Mode 3 — Gap Only (Compare 2 Test Cases)
Enable when:
- User asks for a "gap report", "compare test cases", or "which tests are missing"
- User attaches/mentions 2 different test case files
Read the complete instructions from:
@references/output-format.md#gap-report
Output: File gap-report-[nama]-[tanggal].md.
Default Output Format
All test cases are written in Gherkin (Given-When-Then) format unless the user requests another format.
Supported formats:
| Flag | Format | Output | When used |
|---|---|---|---|
| (default) | Gherkin / BDD | *.feature |
CI/CD, Cucumber, BDD framework |
--format table |
Markdown Table | *.md |
Review in chat, lightweight documentation |
--format xlsx |
Excel (5 sections) | *.xlsx |
Professional TC management, status tracking, automation reference |
--format steps |
Plain Steps | *.md |
Non-technical teams, simple manual testing |
--format playwright |
Playwright TypeScript | *.spec.ts |
Directly becomes an automation script |
Recommendation: Use
--format xlsxfor the most complete output — covering Test Case Information, Source, Application Overview, Status Summary, and Test Case Table in one Excel file that can be used directly as an official QA document.
Excel Format (--format xlsx) — Complete Structure
The Excel output consists of 5 sequential sections in 1 sheet:
1. TEST CASE INFORMATION ← metadata dokumen (Feature Name, Created By, dll)
2. SOURCE ← asal test case (PRD / URL / dll)
3. APPLICATION OVERVIEW ← deskripsi singkat aplikasi
4. TEST CASE STATUS ← ringkasan status (auto-count via COUNTIF)
5. TEST CASE TABLE ← tabel utama semua test case
Test Case Table Columns:
TC ID | Scenario | Summary | Priority | Pre-Conditions | Test Step | Test Data | Expected Result | Actual Result | Test Case Status | Automation Status | Notes
TC ID format: TC0001, TC0002, ... (4 digits, auto-increment)
Priority: P1 - High / P2 - Medium / P3 - Low
Test Case Status: untested (default) / passed / onprogress / blocked / failed / retest
Automation Status: determined based on analysis — not all TCs need automation:
automated— script already existsto be automated— automation candidate (repetitive flow, regression)in progress— script is being createdmanual only— not suitable for automation (visual, external system, rarely run)
See the complete template and guidance for determining status at:
@references/output-format.md#table-format
Browser Automation
This skill supports two browser mechanisms in a hybrid manner:
MCP Playwright (Primary Priority)
If MCP Playwright is available (detected from tool mcp__playwright__* or mcp__executeautomation-playwright-mcp-server__*), use MCP for:
- Real-time navigation and interaction
- Direct screenshots
- Network request inspection
- Console log monitoring
Bundled Scripts (Fallback)
If MCP is not available, use the scripts in the folder scripts/:
# Install dependencies dulu
cd skills/qa-explorer/scripts && npm install
# Phase 1: Inventarisasi elemen
node scripts/inventory.js --url <URL> [--auth-cookie <cookie>]
# Phase 2 & 3: Happy path + negative tests
node scripts/happy-path.js --url <URL> --inventory inventory-output.json
# Phase 4: Generate laporan
node scripts/reporter.js --inventory inventory-output.json --results results.json --name <feature-name>
State Management
This skill uses the file qa-spec-[nama].json to store state between sessions:
qa-spec-login.json ← dari Mode 1 (pre-dev)
login.feature ← test case @unverified
gap-report-login-2026.md ← dari Mode 2 atau Mode 3
Automatic detection:
- Mode 2 is run → check whether there is
qa-spec-*.jsonin the working directory - If there is → automatically perform gap analysis after exploration
- If there is not → save the results as
qa-spec-[nama].jsonnew
Naming Convention
Use the feature name as the basis for the file name:
qa-spec-[fitur].json(e.g.:qa-spec-checkout.json)[fitur]-unverified.feature(e.g.:checkout-unverified.feature)[fitur]-verified.feature(e.g.:checkout-verified.feature)gap-report-[fitur]-[YYYY-MM-DD].md
Ask the user for the feature name if it is not clear from the context.