Agent Skills › dartsim/dart › dart-test

dart-test

GitHub

DART测试技能,涵盖单元测试、集成测试、CI验证及调试。支持Pixi命令执行、GoogleTest规范、GUI与仿真端到端检查,提供失败排查与CI日志获取方法。

.agents/skills/dart-test/SKILL.md dartsim/dart

Trigger Scenarios

编写或调试DART测试 执行CI/CD验证流程 排查测试失败原因

Install

npx skills add dartsim/dart --skill dart-test -g -y
More Options

Non-standard path

npx skills add https://github.com/dartsim/dart/tree/main/.agents/skills/dart-test -g -y

Use without installing

npx skills use dartsim/dart@dart-test

指定 Agent (Claude Code)

npx skills add dartsim/dart --skill dart-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add dartsim/dart --all -g -y

预览 repo 内 skill

npx skills add dartsim/dart --list

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 from test_Issue000Template.cpp)

Writing Tests

  1. Follow existing patterns in the test directory
  2. Use GoogleTest framework
  3. 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 build builds libraries only, NOT every test binary. If you run ctest directly, build the relevant test target first; pixi run build-tests builds the branch test targets.
  • pixi run test-all builds the default CMake ALL graph. The branch config pins BUILD_TESTING=ON, so that graph also runs CTest and pytest. Pair it with pixi run lint; use pixi run test or pixi run test-py for focused reruns and clearer failure attribution.
  • pixi run test, test-py, and test-all build the GUI but skip tests that need a graphics device (CTest label gui-device and the Python GUI rendering tests). Device-free GUI tests remain in the default gates; the gui label covers all GUI tests. GUI, Filament, and dartpy.gui changes also need pixi run test-gui, which selects -L gui -LE filament-native in the same build/<env>/cpp/Release tree. 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-native on 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:25

    新增test-gui和Gazebo兼容门控命令;重构测试组织与命名规范;更新CI验证步骤以适配Filament渲染器;优化调试与构建说明。

  • bcd584e 2026-09-02 23:41
  • b9fbefc 2026-07-19 11:30

Same Skill Collection

.agents/skills/dart-analyze/SKILL.md
.agents/skills/dart-architecture/SKILL.md
.agents/skills/dart-audit-agent-compliance/SKILL.md
.agents/skills/dart-backport-pr/SKILL.md
.agents/skills/dart-benchmark-packet/SKILL.md
.agents/skills/dart-branch-cleanup/SKILL.md
.agents/skills/dart-build/SKILL.md
.agents/skills/dart-changelog/SKILL.md
.agents/skills/dart-ci/SKILL.md
.agents/skills/dart-close-issue/SKILL.md
.agents/skills/dart-contribute/SKILL.md
.agents/skills/dart-deps/SKILL.md
.agents/skills/dart-docs-update/SKILL.md
.agents/skills/dart-downstream-fix/SKILL.md
.agents/skills/dart-execute-packet/SKILL.md
.agents/skills/dart-fix-issue/SKILL.md
.agents/skills/dart-io/SKILL.md
.agents/skills/dart-manage-pr/SKILL.md
.agents/skills/dart-mechanical-refactor/SKILL.md
.agents/skills/dart-model-upgrade/SKILL.md
.agents/skills/dart-new-task/SKILL.md
.agents/skills/dart-next/SKILL.md
.agents/skills/dart-perf/SKILL.md
.agents/skills/dart-plan-update/SKILL.md
.agents/skills/dart-pr/SKILL.md
.agents/skills/dart-python/SKILL.md
.agents/skills/dart-references/SKILL.md
.agents/skills/dart-release-ci-fix/SKILL.md
.agents/skills/dart-release-merge-main/SKILL.md
.agents/skills/dart-release-packaging/SKILL.md
.agents/skills/dart-resume/SKILL.md
.agents/skills/dart-retro/SKILL.md
.agents/skills/dart-review-pr/SKILL.md
.agents/skills/dart-triage-issue/SKILL.md
.agents/skills/dart-ultrawork/SKILL.md
.agents/skills/dart-verify-sim/SKILL.md
.claude/skills/dart-architecture/SKILL.md
.claude/skills/dart-build/SKILL.md
.claude/skills/dart-ci/SKILL.md
.claude/skills/dart-contribute/SKILL.md
.claude/skills/dart-io/SKILL.md
.claude/skills/dart-perf/SKILL.md
.claude/skills/dart-python/SKILL.md
.claude/skills/dart-references/SKILL.md
.claude/skills/dart-test/SKILL.md
.claude/skills/dart-verify-sim/SKILL.md
.codex/skills/dart-analyze/SKILL.md
.codex/skills/dart-architecture/SKILL.md
.codex/skills/dart-audit-agent-compliance/SKILL.md

Metadata

Files
0
Version
f630c91
Hash
fab7a354
Indexed
2026-07-19 11:30

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 03:41
浙ICP备14020137号-1