dart-test
GitHubDART测试技能,涵盖单元测试、集成测试及CI验证。提供Pixi命令用于快速运行C++/Python测试,指导GoogleTest编写规范,并包含GUI/Filament仿真测试及故障排查指南。
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-py # Python tests
pixi run test-all # Build defaults and run C++/Python tests
pixi run test-gui # GUI tests except native-window tests; needs a graphics device
pixi run -e gazebo test-gz # Gazebo/gz-physics compatibility gate
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:
tests/regression/(start fromtest_Issue000Template.cpp)
Writing Tests
- Follow existing patterns in the test directory
- Use GoogleTest framework
- Name tests descriptively, in the style of the neighboring tests in that file
CI Validation
Before submitting PR:
pixi run lint # Must pass
pixi run test-all # Default build plus C++/Python runtime aggregate
pixi run -e gazebo test-gz # Must pass when Gazebo/gz-physics compatibility could be affected
Debugging Test Failures
# Run the smallest existing Pixi test task that covers the failure
pixi run test
# Get CI logs
gh run view <RUN_ID> --log-failed
Simulation And Visual End-to-End Checks
When a failure or change depends on scene structure, dynamics,
collision/contact, simulation stepping, Filament output, or a visual example, also
load dart-verify-sim. Use its text-first oracle and then an assessed,
claim-tied capture through DebugOverlay. Record a concrete no-visual reason
only when capture is unavailable or not applicable.
Gotchas
pixi run buildbuilds libraries only, NOT every test binary. If you runctestdirectly, build the relevant test target first;pixi run build-testsbuilds the branch test targets.pixi run test-allbuilds the default CMakeALLgraph. The branch config pinsBUILD_TESTING=ON, so that graph also runs CTest and pytest. Pair it withpixi run lint; usepixi run testorpixi run test-pyfor focused reruns and clearer failure attribution.pixi run test,test-py, andtest-allbuild the GUI but skip tests that need a graphics device (CTest labelgui-deviceand the Python GUI rendering tests). Device-free GUI tests remain in the default gates; theguilabel covers all GUI tests. GUI, Filament, anddartpy.guichanges also needpixi run test-gui, which selects-L gui -LE filament-nativein the samebuild/<env>/cpp/Releasetree. Native-window tests need a desktop session or Xvfb:ctest --test-dir build/<env>/cpp/Release -L filament-native(ctest --test-dir build/<env>/cpp -C Release -L filament-nativeon Windows).- For package, collision, constraint, or dependency changes that could affect
downstream users, run
pixi run -e gazebo test-gz.
Version History
-
f630c91
Current 2026-10-18 20:26
新增Gazebo兼容性门控测试(test-gz);将test-unit重命名为test;重构仿真可视化检查逻辑,引入text-first oracle和DebugOverlay捕获机制;更新GUI测试过滤策略。
-
bcd584e
2026-09-02 23:42
更新仿真与视觉端到端检查说明,细化触发场景描述并修复拼写错误。
-
b9fbefc
2026-07-19 11:31
新增仿真和视觉端到端检查部分,指导在依赖场景结构、动力学或GUI输出时加载dart-verify-sim技能进行文本优先验证和无头捕获。
- e0d13fd 2026-07-05 10:36


