一键导入
test
Run tests intelligently and help fix failures
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run tests intelligently and help fix failures
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run CodeRabbit CLI code review and interactively fix issues
Write detailed commit messages and create commits
Run formatters and linters, then fix reported issues
Generate PR title and description from branch diff against origin/main
Comprehensive PR review with detailed explanations and constructive feedback
Analyze and resolve git merge conflicts with guided assistance
基于 SOC 职业分类
| name | test |
| description | Run tests intelligently and help fix failures |
| triggers | ["test","run tests","run test","test failure","fix test","failing test","debug test"] |
Use this skill to run tests intelligently, analyze failures, and help fix issues.
Use AskUserQuestion to determine what to test:
Question: "What would you like to test?" Header: "Test Scope" Options:
Based on selection, run appropriate command:
make test/failed-only
make test/unit
make test/e2e
make test
Ask user for pattern, then run:
python -m pytest tests/ -k "<pattern>" -v --tb=short
Parse test output and categorize failures:
## Test Results
**Summary**: X passed, Y failed, Z skipped
### Failed Tests
| Test | File | Error Type | Quick Summary |
|------|------|------------|---------------|
| test_example | tests/unit/test_example.py:45 | AssertionError | Expected 5, got 3 |
For each failed test, provide detailed analysis:
## Failure Analysis
### 1. test_example (tests/unit/test_example.py:45)
**Error**:
AssertionError: assert result == expected
**Likely Cause**:
1. [Possible cause 1]
2. [Possible cause 2]
**Related Code**:
- Source: `veeksha/module.py:120`
Use AskUserQuestion for each failure:
Question: "How would you like to handle this failure?" Header: "Fix Strategy" Options:
When applying fixes:
python -m pytest tests/path/to/test.py::test_name -v --tb=short
After all fixes:
make test/failed-only
| Command | Description | When to Use |
|---|---|---|
make test | All tests (unit + E2E) | Before major releases |
make test/unit | Unit tests | Before commits, after changes |
make test/e2e | End-to-end tests | Testing full workflows |
make test/failed-only | Only failed tests | Fast iteration during fixes |
ModuleNotFoundError: No module named 'veeksha.xxx'
Fix: pip install -e . or pip install -e ".[dev]"
FileNotFoundError: [Errno 2] No such file or directory
Fix: Check test fixtures and data paths
TypeError: unexpected keyword argument
Fix: Check function signatures match test expectations
# Rerun failed tests (fastest)
/test --failed
# Run all unit tests
/test --all
# Run specific test file
/test tests/unit/test_session.py
# Run tests matching pattern
/test -k "microbench"