test

FWFsoft's avatarfrom FWFsoft

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.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 4, 2026

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.
nametest
descriptionRun 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

  1. Run tests:

    make test
    
  2. Run tests with coverage:

    make test-coverage
    

Test Structure

Tests are organized into modular suites:

  • PlayerMovement - Player movement and bounds tests
  • NetworkProtocol - Network serialization/deserialization tests
  • EventBus - Event bus pub/sub tests
  • InputSystem - Input handling tests
  • RemotePlayerInterpolation - Remote player interpolation tests
  • ClientPrediction - 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