dart-test — скилл для Claude Code: тесты, CI и отладка
Скилл dart-test для Claude Code и Codex: написание и отладка тестов Dart. Содержит команды для unit-тестов, интеграционных тестов, проверки CI и визуальной верификации симуляций.
BSD-2-Clause 1 установок ★ 1 232 обновлён 2026-10-29
npx skills add dartsim/dart --skill dart-test -a claude-codeЧто делает dart-test
Включает быстрые команды для запуска тестов через Pixi: pixi run test для быстрой проверки, pixi run test-all для полной сборки и C++/Python тестов, pixi run test-gui для GUI-тестов. Тесты организованы по типам — unit в tests/unit/, интеграционные в tests/integration/, регрессионные в tests/regression/.
Для написания используется GoogleTest. Перед отправкой PR нужно запустить pixi run lint, pixi run test-all и при изменениях совместимости с Gazebo — pixi run -e gazebo test-gz. Отладка начинается с pixi run test для изоляции ошибки, затем смотрят логи CI через gh run view.
Главная хитрость: pixi run build собирает только библиотеки, не бинарники тестов. Нужно либо pixi run build-tests, либо сначала собрать конкретный target. GUI-тесты, требующие видеокарты, пропускаются в test-all, но включаются в test-gui. Для изменений сцены, динамики или отрисовки Filament загружайте вместе со скиллом dart-verify-sim.
Какие задачи решает
- запустить unit-тесты проекта DART через Pixi
- проверить интеграционные тесты перед отправкой PR
- отладить отказавший тест через логи CI
- протестировать изменения GUI и визуальный вывод
- убедиться в совместимости с Gazebo при изменении коллизий
Примеры запросов агенту
- Запусти быструю проверку с
pixi run test - Выполни полный набор тестов и линтера перед PR:
pixi run lintиpixi run test-all - Проверь GUI-тесты командой
pixi run test-gui
Как установить dart-test
1Через Skills CLI (Vercel)
npx skills add dartsim/dart --skill dart-test -a claude-code2Вручную: положить файлы
~/.claude/skills/dart-test/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/dart-test/
1Через Skills CLI (Vercel)
npx skills add dartsim/dart --skill dart-test -a codex2Вручную: положить файлы
.agents/skills/dart-test/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dartsim/dart --skill dart-test -a cursor2Вручную: положить файлы
.cursor/skills/dart-test/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dartsim/dart .claude/skills/dart-test2Вручную: положить файлы
.github/skills/dart-test/SKILL.md1Через Skills CLI (Vercel)
npx skills add dartsim/dart --skill dart-test -a gemini-cli2Командой платформы
gemini skills install https://github.com/dartsim/dart --path .claude/skills/dart-testВручную: положить файлы
.devin/skills/dart-test/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dartsim/dart --skill dart-test -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о dart-test
Как установить dart-test в Claude Code?
Выполни npx skills add dartsim/dart --skill dart-test -a claude-code, затем открой ~/.claude/skills/dart-test/SKILL.md.
Что делает dart-test?
Предоставляет команды Pixi для запуска unit-тестов, интеграционных тестов, проверки CI-валидации и визуальной отладки симуляций DART. Включает конфигурацию для GoogleTest и пути к тестовым директориям.
Зачем нужно загружать dart-verify-sim вместе с dart-test?
Когда изменения касаются структуры сцены, динамики, коллизий, отрисовки Filament или визуального примера, dart-verify-sim добавляет текстовый оракул и инструменты для захвата с DebugOverlay.
Исходный текст
SKILL.md · BSD-2-Clause
--- 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 ```bash 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: ```bash 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 ```bash # 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`.
© dartsim · BSD-2-Clause · dartsim/dart