Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 3.44 KB

File metadata and controls

45 lines (35 loc) · 3.44 KB

TestSpec Agent Workflow

Configured integrations: Codex.

TestSpec uses agent-executed generation and CLI-managed validation/export. Claude Code, Codex, Qoder, Trae, or another coding agent should generate semantic artifacts from requirements; the testspec CLI remains provider-free and deterministic.

Provider-neutral generation rules:

  • The coding agent performs semantic generation; the TestSpec CLI remains provider-free and deterministic.
  • Always read proposal.md and the referenced requirement document before generating semantic artifacts.
  • If the requirement document is missing, unreadable, remote, or ambiguous, stop and ask the user for readable content or explicit authorization; do not guess.
  • Keep traceability in requirement analysis and test-point artifacts; compact test cases use only the executable schema: title, module, type, priority, preconditions, steps, expectedResult.
  • Use 待确认 or clarification questions for unspecified behavior instead of fabricating business rules, roles, state transitions, limits, or SLA values.
  • Generate concrete executable steps and observable expected results; avoid generic template wording such as 'execute operation' or '符合需求'.
  • Run testspec validate [name] before export workflows and fix blocking validation errors before producing Excel or mind-map artifacts.

Workflow labels and backing CLI commands:

Workflow label Backing CLI command Agent behavior
test:new testspec new <name> --requirement <path> Create a test proposal workspace from a requirement document.
test:analysis testspec analysis [name] Agent reads the requirement source and writes grounded requirements-analysis.md.
test:points testspec points [name] Agent derives traceable specs/testpoints.md from analysis and source evidence.
test:validate testspec validate [name] CLI validates compact schema and quality of generated artifacts.
test:excel testspec excel [name] Agent writes compact executable artifacts/testcases.json, validates it, then exports compact Excel.
test:mind testspec mind [name] Export mind-map style test cases for review.
test:report testspec report [name] Generate execution statistics from Excel results.
test:archive testspec archive [name] Archive the full test artifact chain for traceability.

Recommended order:

  1. test:new creates testspec/changes/<name>/proposal.md.
  2. test:analysis creates grounded requirements-analysis.md from requirement evidence.
  3. test:points creates traceable specs/testpoints.md.
  4. test:excel creates compact executable artifacts/testcases.json using exactly the schema title, module, type, priority, preconditions, steps, expectedResult; runs testspec validate; and exports compact artifacts/<name>_cases.xlsx.
  5. test:validate can be run independently to check compact schema and quality.
  6. test:mind creates artifacts/<name>_cases.xmind from the same structured cases.
  7. test:report creates report.md after Excel execution results are filled.
  8. test:archive moves the change to testspec/changes/archive/<date>-<name>/.

Important: test:* entries are Agent workflow labels, not shell commands. Use testspec <subcommand> in the terminal.