Debug and fix failing tests systematically
Scanned 9/12/2026
Install to Claude Code
npx -y skills add TypedDevs/bashunit --skill fix-test --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Fix Test?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/typeddevs-fix-test)More formats (shields.io, HTML) on the badges page.
---
name: fix-test
description: Debug and fix failing tests systematically
allowed-tools: Read, Edit, Bash, Grep, Glob
---
# Fix Test
Systematically debug and fix failing test(s).
## Workflow
### 1. Identify Failures
```bash
./bashunit tests/ 2>&1
```
Parse: which files, which functions, error messages.
### 2. Categorize Each Failure
- **Test bug** — test itself is wrong (wrong expected value, bad setup)
- **Implementation bug** — code doesn't match expected behavior
- **Environment issue** — missing dependency, wrong fixture path
- **Race condition** — passes sequential, fails parallel
- **Flaky test** — network/time/random dependency
### 3. Fix
- **Test bug:** correct assertion or setup
- **Implementation bug:** minimal fix in `src/`, follow TDD
- **Environment:** fix `set_up` / fixtures
- **Race condition:** use `$temp_dir` for isolation, `wait` for async
- **Flaky:** mock external dependencies
### 4. Verify
```bash
./bashunit path/to/fixed_test.sh # Specific test
./bashunit tests/ # Full suite
./bashunit --parallel tests/ # Isolation check
```
### 5. Prevent Regression
Document root cause. Consider adding edge case tests to prevent recurrence.
## Debugging Tips
- Use `--filter "test_name"` to run single test
- Add `echo "DEBUG: $var" >&2` temporarily
- Check fixtures exist: `ls tests/fixtures/`
- Verify mocks: `assert_have_been_called mock_name`
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Practical guide to testing web applications with screen readers for comprehensive accessibility validation.
使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。
Go测试模式包括表格驱动测试、子测试、基准测试、模糊测试和测试覆盖率。遵循TDD方法论,采用地道的Go实践。
Django测试策略,包括pytest-django、TDD方法论、factory_boy、模拟、覆盖率以及测试Django REST Framework API。
克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则