test
Run all tests for the Gambit game engine. Use when the user wants to run tests, verify functionality, or check that code changes haven't broken anything.
When & Why to Use This Skill
This Claude skill automates the testing lifecycle for the Gambit game engine, enabling developers to build projects and execute comprehensive test suites using CTest. It streamlines quality assurance by verifying critical game components—such as player movement, network protocols, and client-side prediction—ensuring code stability and preventing regressions through automated validation and detailed coverage reporting.
Use Cases
- Regression Testing: Run the full test suite after implementing new features or refactoring code to ensure existing game engine logic remains intact.
- Component Validation: Verify the integrity of specific modular systems like the EventBus, InputSystem, or NetworkProtocol using isolated test execution.
- Code Coverage Analysis: Generate detailed HTML coverage reports to identify untested code paths and improve the overall quality of the Gambit engine.
- Continuous Integration: Use as a pre-commit or post-build check to confirm that all 6 core test suites pass with 100% success before merging changes.
- Debugging: Quickly isolate failures by running specific test suites in parallel or with verbose output to identify the root cause of logic errors.
| name | test |
|---|---|
| description | Run all tests for the Gambit game engine. Use when the user wants to run tests, verify functionality, or check that code changes haven't broken anything. |
Run Tests
Builds the project (if needed) and runs all tests using CTest.
Instructions
Run tests:
make testRun tests with coverage:
make test-coverage
Test Structure
Tests are organized into modular suites:
PlayerMovement- Player movement and bounds testsNetworkProtocol- Network serialization/deserialization testsEventBus- Event bus pub/sub testsInputSystem- Input handling testsRemotePlayerInterpolation- Remote player interpolation testsClientPrediction- Client-side prediction tests
Expected Output
On success, you should see:
100% tests passed, 0 tests failed out of 6
On failure, CTest will show which test suites failed with error details.
Notes
- Tests use CTest for better isolation and parallel execution
- Each test suite is a separate executable in
build/test_* - Run specific tests with:
cd build && ctest -R <TestName> - Run tests in parallel with:
cd build && ctest -j8 - Coverage reports available at
build/coverage/index.html