test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTest
测试
Run tests with coverage reporting. This skill auto-detects test frameworks in the
project.
运行带覆盖率报告的测试。该技能会自动检测项目中的测试框架。
Primary Command
主要命令
- - Run tests via lintro (handles multiple frameworks)
uv run lintro tst
- - 通过lintro运行测试(支持多框架)
uv run lintro tst
Framework Detection
框架检测
When lintro is unavailable or you need to run specific test types, detect frameworks by
checking for:
| Framework | Config Files | Test Patterns | Run Command |
|---|---|---|---|
| Vitest | | | |
| Jest | | | |
| Playwright | | | |
| RSpec | | | |
| pytest | | | |
| BATS | | | |
| Go | | | |
| Rust | | | |
当lintro不可用或需要运行特定类型的测试时,可通过检查以下内容检测框架:
| 框架 | 配置文件 | 测试文件模式 | 运行命令 |
|---|---|---|---|
| Vitest | | | |
| Jest | | | |
| Playwright | | | |
| RSpec | | | |
| pytest | | | |
| BATS | | | |
| Go | | | |
| Rust | | | |
Rules
规则
- Check scripts for project-specific test commands
package.json - For shell tests, follow the skill for detailed BATS guidance
test-shell - Run tests with coverage enabled and include a coverage report in every test run (this skill owns the coverage policy)
- 检查脚本获取项目特定的测试命令
package.json - 对于Shell测试,请遵循技能获取详细的BATS指导
test-shell - 运行测试时启用覆盖率,并在每次测试运行中包含覆盖率报告(本技能负责覆盖率策略)
Usage
使用方法
When asked to run tests:
- Try lintro first:
uv run lintro tst - If lintro unavailable or specific tests needed:
- Check for config files to detect frameworks
- Check for test scripts
package.json - Run the appropriate command for each framework
- Review coverage reports
- Ensure test coverage for new/modified code
当需要运行测试时:
- 优先尝试lintro:
uv run lintro tst - 如果lintro不可用或需要运行特定测试:
- 检查配置文件以检测框架
- 检查中的测试脚本
package.json - 为每个框架运行相应的命令
- 查看覆盖率报告
- 确保新增/修改代码的测试覆盖率
Writing Tests
编写测试
For how to write tests, delegate to the appropriate skill:
| Stack / tool | Skill |
|---|---|
| Python (pytest) | |
| TypeScript/JavaScript (Vitest/Jest) | |
Rust ( | |
| Shell (BATS) | |
| Playwright E2E | |
| Playwright API | |
For other frameworks (RSpec, Go), follow project conventions and the patterns detected
above.
关于如何编写测试,请参考对应技能:
| 技术栈/工具 | 技能名称 |
|---|---|
| Python (pytest) | |
| TypeScript/JavaScript (Vitest/Jest) | |
Rust ( | |
| Shell (BATS) | |
| Playwright E2E | |
| Playwright API | |
对于其他框架(RSpec、Go),请遵循项目约定和上述检测到的模式。