Files
uLib/.agents/skills/testing_guide.md

1.2 KiB

Skill: Standardized Testing & Validation

This skill provides the standard workflow for testing and validating changes in the uLib project.

Context

  • Tooling: ctest and direct execution of test binaries in the build/ directory.
  • Location: Test binaries are typically located in build/src/*/testing/ or build/Testing/.

Workflow

1. Running All Tests

From the root directory:

ctest --test-dir build/clang-make --output-on-failure

2. Running Component Tests

Run specific categories of tests:

  • Core: ./build/clang-make/src/Core/testing/CoreTest
  • Math: ./build/clang-make/src/Math/testing/MathVectorTest
  • Geant: ./build/clang-make/src/HEP/Geant/testing/GeantApp
  • VTK: ./build/clang-make/src/Vtk/testing/vtkViewerTest

3. Debugging a Failing Test

Run the binary directly through gdb or valgrind (if available):

gdb --args ./build/clang-make/src/Core/testing/ObjectWrapperTest

Validation Checklist for New Features

  • Does ctest pass globally?
  • If changing visualization, does vtkViewerTest show the correct results?
  • If changing Geant logic, does GeantApp run without memory aborts?
  • Are new tests added to the appropriate CMakeLists.txt?