dart-test

提供针对 DART 项目的系统化测试支持,涵盖单元测试、集成测试及 CI 流水线验证,通过标准化的测试结构与执行流程确保代码质量,适用于本地调试与持续集成环境中的自动化检查。

快捷安装

在终端运行此命令,即可一键安装该 Skill 到您的 Claude 中

npx skills add dartsim/dart --skill "dart-test"

DART Testing

Load this skill when writing or debugging tests.

Quick Commands

pixi run test         # Quick test run
pixi run test-all     # Full validation
pixi run test-unit    # Unit tests
pixi run test-py      # Python tests

Full Documentation

For complete testing guide: docs/onboarding/testing.md

For CI/CD troubleshooting: docs/onboarding/ci-cd.md

Test Organization

  • Unit tests: tests/unit/
  • Integration tests: tests/integration/
  • Regression tests: Near the code they test

Writing Tests

  1. Follow existing patterns in the test directory
  2. Use GoogleTest framework
  3. Name tests descriptively: TEST(ClassName, MethodName_Condition_ExpectedResult)

CI Validation

Before submitting PR:

pixi run lint         # Must pass
pixi run test-all     # Must pass

Debugging Test Failures

# Run the smallest existing Pixi test task that covers the failure
pixi run test-unit

# Get CI logs
gh run view <RUN_ID> --log-failed