gz-test

Runs and debugs gz-sim unit, integration, performance, and benchmark tests via CTest.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill gz-test-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gz-test
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/gz-test
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill gz-test-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Navigating gz-sim's large CTest-based test suite is tedious: tests are split across unit, integration, performance, and benchmark targets with different naming prefixes, and debugging a single failing case requires knowing the right gtest binary and flags. This Skill provides the exact commands to run, filter, and debug any of them. ## Core Features & Use Cases - Full and filtered test runs: Execute the entire suite with ctest, or filter by prefix (UNIT_, INTEGRATION_, PERFORMANCE_, BENCHMARK_, PYTHON_) to run only what changed. - Single-failure debugging: Rebuild one target, reproduce with gtest filters, repeat and shuffle flags, and step through under gdb, ASan, or TSan. - Headless CI support: Wrap GUI-dependent tests with xvfb-run so integration tests pass on machines without a display. - Use Case: After modifying the diff-drive system, run only INTEGRATION_diff_drive_system with --gtest_repeat=10 to confirm the fix and check for flakiness before pushing. ## Quick Start Run the gz-sim integration tests and show me which ones pass or fail.

Frequently Asked Questions about gz-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run gz-sim tests with CTest?

Run ctest --test-dir build --output-on-failure -j$(nproc) from the repository root to execute the full suite. Use -R with prefixes like ^INTEGRATION_ or ^UNIT_ to run only a subset of tests.

How to debug a single failing gtest case in gz-sim?

Rebuild only that target with cmake --build build --target <name>, then run the binary in build/bin with --gtest_filter to isolate the case. Use gdb for crashes, ASan for pointer issues, and TSan for data races.

How do I run gz-sim GUI tests on a headless CI server?

Wrap the ctest invocation with xvfb-run -s '-screen 0 1280x1024x24' to provide a virtual display. Most GUI-dependent integration tests require this to pass on machines without a monitor.

How can I check a gz-sim test for flakiness?

Run the test binary directly with --gtest_repeat=10 and --gtest_shuffle to execute the suite repeatedly in random order. This surfaces order-dependent and intermittent failures that a single run would miss.

Why are gz-sim benchmark results inconsistent between runs?

Benchmarks are noisy on shared or loaded machines, so avoid running them under load. Use --benchmark_min_time and export results with --benchmark_out in JSON format for comparable measurements.