Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Testing
Beez uses Google Test and CTest. Tests are organized in layers; pick the lowest layer that can express the behavior, then add higher layers when components interact or user-visible behavior matters.
make test# Release build tests
make test BUILD_TYPE=Debug # Debug build testsOutput is tee'd to report/test/test-report.txt.
Run a single test binary directly:
cd build/build/Release
./bin/beez_tests --gtest_filter=Registry.*
ctest --output-on-failure -R beez_integration| Layer | Location | When to add |
|---|---|---|
| Unit | tests/unit/ | Pure logic, parsers, options, cache math |
| Integration | tests/integration/ | Orchestrator + plugins, CLI as subprocess |
| System | tests/system/scenarios/ | End-to-end with fixture build.lua projects |
| Performance | tests/performance/ | Throughput or timing regressions |
| Fuzz | tests/fuzz/ | DSL parser robustness |
- Executable:
beez_tests - Mirror
src/folders:tests/unit/core/,tests/unit/cli/,tests/unit/plugins/lua/, etc. - Cover positive and negative cases (invalid input, missing fields, unknown names).
- Executable:
beez_integration_tests - Uses real
beezbinary viaBEEZ_EXECUTABLEcompile definition - Examples: Lua + shell pipeline, step cache pipeline, CLI completion install
- Fixture project per scenario under
tests/system/fixtures/<name>/ - Scenario
.cppfiles undertests/system/scenarios/ - Run Beez against fixture
build.luaand assert exit codes and output
Adding a system fixture:
tests/system/fixtures/my-scenario/
build.lua
Then add a scenario test that points at that fixture.
- Labeled with CTest property
performance - Long timeout (600s) for benchmark stability
- Not part of the default quick loop unless you filter by label
Target: fuzz_lua_dsl (LLVM libFuzzer).
make fuzzer-smoke # 30s smoke (default FUZZER_TIME)
make fuzzer-corpus # 60s corpus expansion
FUZZER_TIME=120 make fuzzer-smokeCorpus rules:
- Add seeds only as descriptive
.luafiles undertests/fuzz/corpus/lua_dsl/ - Do not commit hash-named artifacts from fuzzer runs
- Dictionary:
tests/fuzz/lua_dsl.dict - Required when
lua_dsl.cppor DSL syntax changes
Write a failing test first, implement the minimum to pass, then refactor. See Feature Development Workflow.
Every new .cpp test file must be listed in the appropriate CMakeLists.txt:
tests/unit/CMakeLists.txtfor unit teststests/integration/CMakeLists.txtfor integration teststests/system/CMakeLists.txtfor system tests
Forgetting registration is a common review failure: the file compiles nowhere and CI never runs it.
Coverage: new production code should include tests so the project stays at ≥ 85% line coverage on src/. Run make coverage before opening a PR.
- Code Quality - coverage and sanitizer test runs
- Feature Development Workflow - Red/Green/Refactor cycle
- Repository Layout - fixture and fuzz paths
Quick Reference · Glossary · FAQ
- Fundamentals
- Core Concepts
- Project Layout
- First Pipeline
- Phases and Scopes
- How Phases and Scopes Work
- Selecting with Phases and Scopes
- Designing Phases and Scopes
- Parallel Execution and Dependencies
- Configuration
- Configuration Overview
- Global User Config
- Project Config
- Environment Variables
- Performance Settings
- Cache Settings
- Config Reference
- CLI
- CLI Overview
- Running Targets
- Filtering by Phase
- Running a Single Step
- Listing Entities
- Output and Logging Flags
- Cache and Maintenance Flags
- Meta and Utility Commands
- Project Scaffolding —
beez --init(embedded Tempify) - CLI Flag Reference
- Lua DSL
- DSL Overview
- Plugin System — Plugins, Config DSL, Standard-Workflows
- Step Declaration
- Task Declaration
- Workflow Declaration
- Order Declaration
- Configure Step
- ReqPack Declaration
- Beez API
- Step Context
- DSL Patterns
- Caching
- Caching Overview
- Step Cache
- Success Cache
- Glob Metadata Cache
- Artifact Patterns
- Cache Keys and Invalidation
- Cache Storage and Maintenance
- Caching Troubleshooting
- Development and Contribution
- Building and Setup
- Repository Layout
- Testing
- Code Quality
- Feature Development Workflow
- Submitting Changes