Skip to content
create-failing-test logo

Create Failing Test Task

create-failing-test

Use to create failing tests before implementing features (TDD approach). Ensures test-first development workflow.

SKILL.md

Full skill instructions

<!-- Powered by PRISMâ„¢ Core -->

Create Failing Test Task

When to Use

  • Before implementing a new feature (TDD approach)
  • When documenting a customer-reported bug
  • When QA needs exact reproduction steps
  • When validating issue before assigning to Dev
  • When creating acceptance criteria for fixes

Quick Start

  1. Gather evidence from validation (screenshots, errors, steps)
  2. Define test preconditions (data, environment, config)
  3. Write exact reproduction steps
  4. Define assertions (expected vs actual behavior)
  5. Package test specification for Dev/​QA handoff

Purpose

Document a reproducible failing test case that demonstrates the customer issue, providing Dev and QA teams with exact steps and assertions to verify the bug and confirm the fix.

Context

Support agents validate issues but CANNOT write test code. This task creates a detailed test specification with exact reproduction steps that:

  • Dev can use to confirm they see the issue
  • QA can implement as automated test
  • Serves as acceptance criteria for the fix

SEQUENTIAL Task Execution

1. Gather Evidence from Validation

validation_data:
  issue_id: "{ticket_number}"
  
  reproduction_evidence:
    - Playwright validation results
    - Screenshots showing issue
    - Console errors captured
    - Network failures logged
    - Exact user steps taken
    
  environment:
    - Browser and version
    - User role/​permissions
    - Data state required
    - Configuration settings

2. Define Test Preconditions

test_setup:
  data_requirements:
    - User account type needed
    - Specific data records required
    - System configuration state
    - External service dependencies
    
  initial_state:
    - URL to start from
    - Login credentials needed
    - Features enabled/​disabled
    - Database seed data

3. Document Exact Steps to Reproduce

reproduction_steps:
  - step: 1
    action: "Navigate to {specific URL}"
    expected: "Page loads successfully"
    actual: "Page loads successfully"
    
  - step: 2
    action: "Click on {specific element}"
    element_selector: "#button-id or .class-name"
    expected: "Modal opens"
    actual: "Modal opens"
    
  - step: 3
    action: "Enter '{value}' in {field}"
    element_selector: "input[name='fieldname']"
    expected: "Field accepts input"
    actual: "Field accepts input"
    
  - step: 4
    action: "Submit form"
    element_selector: "button[type='submit']"
    expected: "Success message appears"
    actual: "ERROR: {exact error message}"
    
  failure_point:
    step_number: 4
    expected_behavior: "Form submits and shows success"
    actual_behavior: "Form fails with error: {message}"
    error_details:
      - Console error text
      - Network response code
      - Stack trace if available

4. Define Assertions for Test

test_assertions:
  should_pass_but_fails:
    - description: "Form submission should succeed"
      assertion: "expect(successMessage).toBeVisible()"
      current_result: "FAILS - Error message appears instead"
      
    - description: "API should return 200"
      assertion: "expect(response.status).toBe(200)"
      current_result: "FAILS - Returns 500"
      
    - description: "Data should be saved"
      assertion: "expect(database.record).toExist()"
      current_result: "FAILS - No record created"
      
  regression_prevention:
    - "Test should fail before fix applied"
    - "Test should pass after fix applied"
    - "Test should remain in suite permanently"

5. Create Test Specification Document

Generate failing-test-{issue_id}.md:

# Failing Test: {Issue Title}

## Issue ID: {ISSUE-XXX}
## Priority: {P0|P1|P2|P3}
## Status: Reproduces Consistently

## Test Objective
Verify that {specific functionality} works correctly when {conditions}.
Currently FAILS due to {brief description of bug}.

## Preconditions
- Environment: {staging|production}
- User: {role/​permissions}
- Data: {required records}
- Configuration: {settings}

## Steps to Reproduce
1. {Detailed step with selectors}
2. {Detailed step with selectors}
3. {Detailed step with selectors}
4. **FAILURE POINT:** {Where it breaks}

## Expected vs Actual
- **Expected:** {What should happen}
- **Actual:** {What actually happens}
- **Error:** {Exact error message/​behavior}

## Test Assertions
```javascript
// Pseudocode for QA implementation
test('Customer Issue {ID}: {Title}', () => {
  // Setup
  {setup_steps}
  
  // Action
  {action_steps}
  
  // This assertion currently FAILS
  expect({element}).{assertion}
  
  // After fix, this should PASS
});

Evidence

  • Screenshot: {link_to_screenshot}
  • Console Error: {error_text}
  • Network Log: {request/​response}

Definition of Done

  • Test fails consistently before fix
  • Test passes after fix applied
  • Test added to regression suite
  • No similar issues in related areas

### 6. Handoff Package

```yaml
deliverables:
  for_dev_team:
    - Exact reproduction steps
    - Failing assertions to verify
    - Environment requirements
    - Expected behavior after fix
    
  for_qa_team:
    - Test specification document
    - Selectors and assertions
    - Test data requirements
    - Regression suite placement
    
  tracking:
    - Link test to issue ticket
    - Add to test coverage matrix
    - Update test documentation

Success Criteria

  • Test case reproduces the issue 100% of the time
  • Steps are detailed enough for automation
  • Assertions clearly define pass/​fail
  • Dev can use to verify they see the issue
  • QA can implement without clarification
  • Test prevents regression after fix

Output

  • failing-test-{issue_id}.md specification
  • Links to validation evidence
  • Clear handoff to Dev and QA teams
  • Acceptance criteria for fix verification

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View