docs: write TESTING.md — test structure, googletest, and per-module test files #98

Closed
opened 2026-02-09 13:45:26 +00:00 by forbes · 1 comment
Owner

Tier 3 — Infrastructure

File: docs/TESTING.md

What this document should cover

  1. Test infrastructure overview:

    • Google Test framework — tests/lib/ submodule (github.com/google/googletest)
    • CMake integration via tests/CMakeLists.txt
    • Test runner: ctest (invoked via pixi run test)
  2. Test directory structure:

    tests/
    ├── src/           # Test source code (C++)
    ├── lib/           # Google Test framework (submodule)
    ├── CMakeLists.txt # Test build configuration
    ├── assytest.FCStd # Assembly test fixture
    └── assytestpart.FCStd # Part test fixture
    
  3. Running tests:

    • pixi run test / pixi run test-debug / pixi run test-release
    • Direct ctest usage from build directory
    • CI test execution (from build.yml): C++ tests, Python CLI tests, GUI tests
  4. Test categories in CI:

    • C++ unit tests (googletest via ctest)
    • Python CLI tests
    • GUI tests
    • How each category is triggered in the build workflow
  5. Test fixtures:

    • assytest.FCStd — assembly test fixture (what it contains, when to use)
    • assytestpart.FCStd — part test fixture
  6. Writing new tests:

    • C++ test: add to tests/src/, include in CMakeLists.txt
    • Python test: location and conventions
    • Using test fixtures
  7. Per-module test files — document where module-specific tests live (within src/Mod/*/ directories vs centralized tests/)

Key source files

  • tests/CMakeLists.txt — test build config
  • tests/src/ — test implementations
  • .gitea/workflows/build.yml — CI test steps
  • pixi.toml — test task definitions

Acceptance criteria

  • Test structure is documented with directory layout
  • All three ways to run tests are covered (pixi, ctest, CI)
  • Guide for adding new tests exists
  • Test fixtures are described
## Tier 3 — Infrastructure **File:** `docs/TESTING.md` ### What this document should cover 1. **Test infrastructure overview:** - Google Test framework — `tests/lib/` submodule (`github.com/google/googletest`) - CMake integration via `tests/CMakeLists.txt` - Test runner: `ctest` (invoked via `pixi run test`) 2. **Test directory structure:** ``` tests/ ├── src/ # Test source code (C++) ├── lib/ # Google Test framework (submodule) ├── CMakeLists.txt # Test build configuration ├── assytest.FCStd # Assembly test fixture └── assytestpart.FCStd # Part test fixture ``` 3. **Running tests:** - `pixi run test` / `pixi run test-debug` / `pixi run test-release` - Direct ctest usage from build directory - CI test execution (from `build.yml`): C++ tests, Python CLI tests, GUI tests 4. **Test categories in CI:** - C++ unit tests (googletest via ctest) - Python CLI tests - GUI tests - How each category is triggered in the build workflow 5. **Test fixtures:** - `assytest.FCStd` — assembly test fixture (what it contains, when to use) - `assytestpart.FCStd` — part test fixture 6. **Writing new tests:** - C++ test: add to `tests/src/`, include in `CMakeLists.txt` - Python test: location and conventions - Using test fixtures 7. **Per-module test files** — document where module-specific tests live (within `src/Mod/*/` directories vs centralized `tests/`) ### Key source files - `tests/CMakeLists.txt` — test build config - `tests/src/` — test implementations - `.gitea/workflows/build.yml` — CI test steps - `pixi.toml` — test task definitions ### Acceptance criteria - [ ] Test structure is documented with directory layout - [ ] All three ways to run tests are covered (pixi, ctest, CI) - [ ] Guide for adding new tests exists - [ ] Test fixtures are described
forbes added the documentation label 2026-02-09 13:45:26 +00:00
Author
Owner

Superseded by the mdBook documentation structure set up in PR #105. The content scope of this issue is now covered by the pages in docs/src/. Remaining content work is tracked in #104.

Superseded by the mdBook documentation structure set up in PR #105. The content scope of this issue is now covered by the pages in `docs/src/`. Remaining content work is tracked in #104.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#98