AI PROMPT LIBRARY

Test Case Creation.

Prompt templates for generating manual test cases, BDD Gherkin scenarios, edge case analyses, and exploratory testing charters from acceptance criteria and user stories. Each prompt is a starting draft. Fill in the {{VARIABLES}}, review the output, and keep human ownership of the final result.

4
prompts

Review every output. AI-generated code, test cases, and bug reports require human verification before use. Never paste secrets, credentials, or personal data into any AI tool.

Generate Manual Test Cases from Acceptance Criteria

Generate a structured table of manual test cases covering positive, negative, edge, accessibility, and security scenarios from a user story and its acceptance criteria.

beginner
Manual QA, Automation QA, QA LeadWorks with: Claude, ChatGPT, Gemini, Copilot, Cursor, Local LLMs
manual-testingtest-casesacceptance-criteriauser-storytest-design
prompt template
You are an experienced QA analyst. Your job is to produce a comprehensive manual test case suite from the inputs below. Before writing the test cases, list any assumptions you are making. Then output the test cases in a table.

Feature name: {{FEATURE_NAME}}
User story:
{{USER_STORY}}

Acceptance criteria (numbered list):
{{ACCEPTANCE_CRITERIA}}

Business rules:
{{BUSINESS_RULES}}

User roles involved: {{USER_ROLES}}

Instructions for generating test cases:
- Cover all acceptance criteria explicitly — reference the AC number in each test case.
- Include at minimum: positive (happy path), negative (invalid input, boundary violations, missing required fields), edge (empty states, maximum allowed values, special characters), at least one accessibility check (keyboard navigation, visible focus, error messages announced to screen readers), and at least one security check (access by wrong role, direct URL manipulation).
- Output as a Markdown table with columns: TC ID | Title | Preconditions | Steps | Expected Result | Priority (Critical/High/Medium/Low) | Type (Positive/Negative/Edge/Accessibility/Security).
- Keep steps concise: each step is one action ("Enter 'x' in the email field"), not a paragraph.
- After the table, add a separate "Assumptions" section listing anything you inferred that a human must validate.
- Do NOT invent business rules not present in {{BUSINESS_RULES}} — if you need a rule that isn't stated, list it as an assumption.

Output:
1. An "Assumptions" section.
2. The test case table in Markdown.

Generate BDD Gherkin Scenarios from Acceptance Criteria

Generate well-structured Gherkin Feature files with Scenario and Scenario Outline blocks covering happy path, alternative paths, and error paths.

beginner
Manual QA, Automation QA, SDET, QA LeadWorks with: Claude, ChatGPT, Gemini, Copilot, Cursor, Local LLMs
bddgherkincucumberacceptance-criteriatest-design
prompt template
You are a senior QA engineer with deep experience writing BDD specifications in Gherkin. Generate a .feature file from the inputs below.

Feature name: {{FEATURE_NAME}}
User story:
{{USER_STORY}}

Acceptance criteria:
{{ACCEPTANCE_CRITERIA}}

Business rules:
{{BUSINESS_RULES}}

User roles: {{USER_ROLES}}

Instructions:
- Write a Feature block with a short description.
- Map each acceptance criterion to one or more Scenario or Scenario Outline blocks.
- Use Scenario for concrete one-off cases (happy path, specific error states).
- Use Scenario Outline with an Examples table for cases with multiple data permutations (e.g. valid vs invalid inputs).
- Steps must follow strict Given/When/Then structure — no And-chaining without a parent step. Use Background for shared preconditions.
- Step language should be declarative (what, not how): "When the user submits the login form" not "When the user clicks the submit button with id login-btn".
- Tag scenarios: @smoke for happy path, @negative for error paths, @edge for boundary cases.
- Do NOT invent business rules not stated in the inputs — flag invented assumptions in a comment block at the top of the file.
- After the feature file, add a brief "Step Definition Notes" section flagging any steps likely to need custom step definition code.

Output:
1. Any invented assumptions as a comment block.
2. The complete Gherkin .feature file.
3. A "Step Definition Notes" section.

Generate Edge Cases for a Feature

Systematically surface edge cases for a feature using boundary value analysis, equivalence partitioning, and domain knowledge — the scenarios that tend to slip through standard happy-path test suites.

intermediate
Manual QA, Automation QA, SDET, QA LeadWorks with: Claude, ChatGPT, Gemini, Copilot, Cursor, Local LLMs
edge-casesboundary-value-analysisequivalence-partitioningtest-design
prompt template
You are a senior QA engineer specialising in exploratory and risk-based testing. Your task is to systematically generate edge cases for the feature below — scenarios that typical happy-path test suites miss.

Feature name: {{FEATURE_NAME}}
Feature description:
{{FEATURE_DESCRIPTION}}

Inputs and constraints:
{{INPUTS_AND_CONSTRAINTS}}

Business rules:
{{BUSINESS_RULES}}

Tech stack or integration points (optional):
{{TECH_STACK}}

Use the following systematic lenses to generate edge cases. For each lens, produce a named list:
1. Boundary values — minimum, maximum, just-below-minimum, just-above-maximum for every numeric or length-constrained input.
2. Empty and null states — empty strings, null values, missing optional fields when they affect behaviour.
3. Special characters and encoding — Unicode, emoji, SQL-special characters, HTML entities, newlines, in text inputs.
4. Concurrency and race conditions — two users acting on the same record simultaneously, duplicate submissions.
5. State transitions — invalid state sequences (e.g. proceeding to step 3 without completing step 2).
6. External dependencies — what happens when a third-party service (email, payment, auth provider) is slow or returns an error.
7. Data volume — very large payloads, maximum list lengths, deeply nested structures.
8. Locale and timezone — non-ASCII input, right-to-left text, UTC offset transitions, DST changes.
9. Permission and role mismatches — actions attempted by a role with insufficient permissions.

For each edge case, provide: Edge Case ID | Category (from the lenses above) | Description | Why It Matters | Suggested Test Approach.

After the table, add an "Automation Candidates" section flagging which edge cases are strong candidates for automated regression tests and why.

Generate Exploratory Testing Charters

Generate structured exploratory testing charters using the 'Explore / With / To discover' format, targeting specific risk areas and user journeys.

beginner
Manual QA, QA LeadWorks with: Claude, ChatGPT, Gemini, Copilot, Cursor, Local LLMs
exploratory-testingcharterrisk-based-testingmanual-testingtest-design
prompt template
You are a senior QA engineer experienced in session-based exploratory testing and risk-based test planning. Generate exploratory testing charters for the inputs below.

Feature or area to explore: {{FEATURE_OR_AREA}}
Known risks or concerns: {{KNOWN_RISKS}}
User personas to consider: {{USER_PERSONAS}}
Recent changes to this area: {{RECENT_CHANGES}}
Session time budget per charter: {{SESSION_TIME}} (e.g. 60 minutes, 90 minutes)
Environment available: {{ENVIRONMENT}}

Instructions:
- Generate between 4 and 6 charters, each using the format: "Explore [area or feature] with [approach, tool, or data] to discover [risk, information, or potential defect type]".
- After each charter, add:
  - Focus: one sentence on exactly what the tester should pay attention to.
  - Oracles: how the tester will recognise a problem (expected behaviour, documentation, comparison to previous version, other tool output).
  - Out of scope: what this charter deliberately does not cover (to prevent scope creep in the session).
  - Suggested note-taking tags: 3–5 short tags the tester should use when logging observations (e.g. #bug, #question, #performance, #security).
- Order charters by estimated risk: highest risk first.
- Do NOT write step-by-step test scripts — charters guide exploration, not prescribe clicks.
- Add a "Coverage map" section at the end showing which of the known risks each charter addresses.

Output:
1. The charters in the format above.
2. A Coverage map table: Charter | Known Risk Addressed.