Skip to content
analyze-test-results logo

Analyze Test Results Skill

analyze-test-results

Analyze test failures and CI artifacts to identify and fix bugs

SKILL.md

Full skill instructions

Analyze Test Results Skill

Analyze test results from CI or local runs to identify failures, diagnose root causes, and fix bugs.

When to Use

  • After tests fail (CI or local)
  • After running /​download-ci-artifacts
  • When asked to "fix test failures"
  • When asked to "analyze test results"

Workflow

1. Locate Test Results

# From CI artifacts
cat ci-artifacts/​test-report/​test-report.md

# From local run
uv run pytest MouseMaster/​Testing/​Python/ -v --tb=long 2>&1 | tee test-output.log

2. Parse JUnit XML (if available)

# Extract failed tests from XML
grep -E "(failure|error)" ci-artifacts/​unit/​unit-tests.xml | head -20

3. For Each Failure

a. Identify the failing test
FAILED MouseMaster/​Testing/​Python/​test_event_handler.py::TestClass::test_name
b. Read the test file

Understand what the test expects:

  • What behavior is being tested?
  • What are the assertions?
  • What mocks are set up?
c. Read the implementation

Find the code being tested and understand:

  • Current behavior
  • Why it might fail
  • Edge cases
d. Diagnose root cause

Common issues:

  • Mock not configured: Check mock setup in test
  • API changed: Update test or implementation
  • Race condition: Add proper synchronization
  • Missing dependency: Check imports and fixtures

4. Fix the Issue

Apply the minimal fix needed:

# If test expectation is wrong
# → Update the test

# If implementation is wrong
# → Fix the implementation, re-run tests

# If mock setup is incomplete
# → Add proper mock configuration

5. Verify Fix

# Run specific failing test
uv run pytest MouseMaster/​Testing/​Python/​test_file.py::TestClass::test_name -v

# Run full suite
uv run pytest MouseMaster/​Testing/​Python/ -v

Analyzing Slicer Test Failures

Read Slicer output log

cat ci-artifacts/​slicer/​slicer-output.log

Common Slicer issues

ErrorCauseFix
ModuleNotFoundErrorExtension not loadedCheck module paths
AttributeError: 'NoneType'Widget not readyAdd processEvents()
RuntimeError: widget deletedView closedCheck object lifetime
Qt assertionInvalid UI operationRun on main thread

Screenshot analysis

If screenshots captured, review with:

# View manifest
cat ci-artifacts/​screenshots/​manifest.json

# Then use /​review-ui-screenshots skill

Decision Rules

Fix immediately

  • Clear implementation bugs
  • Missing mock configuration
  • Import errors
  • Typos

Investigate more

  • Intermittent failures
  • Platform-specific issues
  • Complex logic errors

Report only

  • Test infrastructure issues
  • CI configuration problems
  • External dependency failures

Report Format

After analysis:

## Test Analysis Report

### Failures Found
| Test | Error | Root Cause |
|------|-------|------------|
| test_name | AssertionError | Incorrect mock setup |

### Fixes Applied
- `file.py:123` - Fixed mock configuration
- `test.py:45` - Updated assertion

### Remaining Issues
- Issue requiring further investigation

### Verification
- [ ] All tests pass locally
- [ ] Lint passes
- [ ] Type check passes

Integration

After fixing:

  1. Run /​run-tests to verify
  2. Commit with fix: description of fix
  3. Push to trigger CI

Related Skills

  • /​download-ci-artifacts - Get artifacts first
  • /​review-ui-screenshots - Analyze UI issues
  • /​fix-bad-practices - Fix code quality issues

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