analyze-test-results

Analyze test failures and CI artifacts to identify and fix bugs

16 stars

Best use case

analyze-test-results is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze test failures and CI artifacts to identify and fix bugs

Teams using analyze-test-results should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyze-test-results/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/testing-security/analyze-test-results/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyze-test-results/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyze-test-results Compares

Feature / Agentanalyze-test-resultsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze test failures and CI artifacts to identify and fix bugs

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

```bash
# 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)

```bash
# 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:

```python
# 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

```bash
# 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

```bash
cat ci-artifacts/slicer/slicer-output.log
```

### Common Slicer issues

| Error | Cause | Fix |
|-------|-------|-----|
| `ModuleNotFoundError` | Extension not loaded | Check module paths |
| `AttributeError: 'NoneType'` | Widget not ready | Add processEvents() |
| `RuntimeError: widget deleted` | View closed | Check object lifetime |
| `Qt assertion` | Invalid UI operation | Run on main thread |

### Screenshot analysis

If screenshots captured, review with:

```bash
# 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:

```markdown
## 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

Related Skills

e2e-testing

16
from diegosouzapw/awesome-omni-skill

End-to-end testing workflow with Playwright for browser automation, visual regression, cross-browser testing, and CI/CD integration.

e2e-testing-patterns

16
from diegosouzapw/awesome-omni-skill

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

e2e-outside-in-test-generator

16
from diegosouzapw/awesome-omni-skill

Generates comprehensive end-to-end Playwright tests using outside-in methodology

dotnet-uno-testing

16
from diegosouzapw/awesome-omni-skill

Tests Uno Platform apps. Playwright for WASM, platform-specific patterns, runtime heads.

cve-testing

16
from diegosouzapw/awesome-omni-skill

CVE vulnerability testing coordinator that identifies technology stacks, researches known vulnerabilities, and tests applications for exploitable CVEs using public exploits and proof-of-concept code.

cui-javascript-unit-testing

16
from diegosouzapw/awesome-omni-skill

Jest unit testing standards covering configuration, test structure, testing patterns, and coverage requirements

core-tester

16
from diegosouzapw/awesome-omni-skill

Comprehensive testing and quality assurance specialist for ensuring code quality through testing strategies

configure-ux-testing

16
from diegosouzapw/awesome-omni-skill

Check and configure UX testing infrastructure (Playwright, accessibility, visual regression)

comprehensive-unit-testing-with-pytest

16
from diegosouzapw/awesome-omni-skill

Aims for high test coverage using pytest, testing both common and edge cases.

Burp Suite Web Application Testing

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "intercept HTTP traffic", "modify web requests", "use Burp Suite for testing", "perform web vulnerability scanning", "test with Burp Repeater", "analyze HTTP history", or "configure proxy for web testing". It provides comprehensive guidance for using Burp Suite's core features for web application security testing.

burp-suite-testing

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "intercept HTTP traffic", "modify web requests", "use Burp Suite for testing", "perform web vulnerability scanning", "test with Burp ...

backtesting-frameworks

16
from diegosouzapw/awesome-omni-skill

Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strateg...