dart-test
GitHub用于编写、运行和调试DART项目的单元测试、集成测试及CI验证,涵盖Pixi命令使用、GoogleTest规范、CUDA环境支持及故障排查指南。
Trigger Scenarios
Install
npx skills add dartsim/dart --skill dart-test -g -y
SKILL.md
Frontmatter
{
"name": "dart-test",
"description": "DART Test: unit tests, integration tests, CI validation, and debugging"
}
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 -e cuda test-all # CUDA-enabled full validation on Linux CUDA hosts
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
- Follow existing patterns in the test directory
- Use GoogleTest framework
- Name tests descriptively:
TEST(ClassName, MethodName_Condition_ExpectedResult)
CI Validation
Before submitting PR:
pixi run lint # Must pass
pixi run test-all # Must pass
pixi run -e cuda test-all # Must pass on Linux CUDA hosts
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
Simulation And Visual End-to-End Checks
When a failure or change depends on 3D structure or behavior, also load
dart-verify-sim: text-first oracle, then an assessed headless capture with
claim-relevant debug layers, or a concrete reason when visual corroboration is
unavailable or not applicable.
Gotchas
pixi run buildbuilds libraries only, NOT the unit-test binaries. If you runctestwithout building the test target first, you may execute stale binaries that silently pass. Use the guarded runner tasks (for examplepixi run test-simulation, which buildsdart_simulation_testsfirst) instead of a rawctest -L <label>against a stale binary.pixi run test-allis the default-environment full gate. On Linux hosts with a visible NVIDIA CUDA runtime, also runpixi run -e cuda test-all; the CUDA run preserves thecudaPixi environment and executes the CUDA CTest + benchmark smoke path when the runtime is detected.- The CUDA Pixi config auto-detects visible GPU compute capabilities for
DART_CUDA_ARCHITECTURES; unsupported PTX/toolchain errors usually mean the generated CUDA architecture flags need to be checked before blaming test code.
Version History
-
bcd584e
Current 2026-09-02 23:42
更新仿真与视觉端到端检查说明,细化触发场景描述并修复拼写错误。
-
b9fbefc
2026-07-19 11:31
新增仿真和视觉端到端检查部分,指导在依赖场景结构、动力学或GUI输出时加载dart-verify-sim技能进行文本优先验证和无头捕获。
- e0d13fd 2026-07-05 10:36


