← ClaudeAtlas

ai-test-generatorlisted

Use for any question or task about generating tests with an LLM from acceptance criteria, user stories or requirements, including whether it works and why generated tests assert the wrong thing. Scores confidence per test case (self-assessment plus assertion, naming and completeness checks), batches uncertain cases for human review and emits tests in the team's existing framework.
testland/qa · ★ 13 · Testing & QA · score 80
Install: claude install-skill testland/qa
# ai-test-generator ## Overview This skill provides an **augmentation framework** for converting acceptance criteria (ACs) into test code: AI generates, the team curates. Generated tests are scored for confidence and reviewed adversarially before merge. ## Step 1 - Define the input ```yaml # input/cart-promo.yaml spec_source: "stories/LIN-1234.md" acceptance_criteria: - id: AC-1.1 description: "Valid promo 'WELCOME10' reduces subtotal by 10%" inputs: cart_total: 24.99 promo_code: "WELCOME10" expected: subtotal_after: 22.49 message: "Code applied" - id: AC-1.2 description: "Expired promo shows error 'This code has expired'" inputs: cart_total: 24.99 promo_code: "EXPIRED50" expected: subtotal_after: 24.99 error: "This code has expired" ``` ## Step 2 - Run the generator Generate one test per AC. Core loop below; full script with helpers and the project-conventions injection is in [references/generation-and-scoring.md](references/generation-and-scoring.md). ```python # scripts/ai-gen.py import openai system = ("Generate one test per AC in {framework} using the project's test " "conventions (inject docs/test-code-conventions.md). Specific " "assertions only - no .toBeTruthy() / .toBeDefined(). If an AC can't " "be satisfied with the given inputs, mark CONFIDENCE: low and say why.") for ac in input_yaml['acceptance_criteria']: response = openai.chat.completions.cr