catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
docs(roadmap): plan steps 9 to 15 and their order of work
- Commit
0b07c4ce6375d15b4715e04d470796ffc7b2f1b7- Author
- Leitwolf11 ·
- Parents
ebad99d7aa31
Changes
docs/progmasoft-roadmap.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/docs/progmasoft-roadmap.md b/docs/progmasoft-roadmap.md index 6db48b06..4929e9cf 100644 --- a/docs/progmasoft-roadmap.md +++ b/docs/progmasoft-roadmap.md @@ -27,6 +27,17 @@ The steps are ordered by what each one builds on. | 6 | Mutation testing | planned | | 7 | Coverage-, mutation- and history-guided test generation | planned | | 8 | Micro-benchmarking | planned, after steps 4 to 7 | +| 9 | Test environment: fixture lifecycle extensions, a virtual clock, isolated filesystems | planned, next after step 4 | +| 10 | Output comparison: structured snapshots, approval testing, golden master testing | planned, after step 9 | +| 11 | Asynchrony and concurrency: async testing, concurrency testing | planned, after steps 5 to 7 | +| 12 | Faults and networks: fault injection, network simulation | planned, after step 11 | +| 13 | Property extensions: combinatorial and pairwise testing, statistical testing, parallel property trials, native fuzzing | planned, after step 12 | +| 14 | Compile-time and contracts: compile-time testing, negative compilation testing, contract testing | planned, after step 13 | +| 15 | Resources and performance: memory leak testing, resource usage testing, performance regression testing | planned, with step 8 | + +Steps are numbered in the order they were planned; the order of work is 4, +9, 10, 5, 6, 7, 11, 12, 13, 14, then 8 and 15 together. Steps 9 and 10 are +small and most later steps use them; steps 8 and 15 both measure. ## 2. The Catch3 runner @@ -111,3 +122,72 @@ tokens, so they run without the generator. Micro-benchmarking is a capability of Catch3 of its own, in the `Progmasoft::Catch3` namespace and run by the Catch3 runner. It follows the other steps: its design is written down here when step 7 is done. + +## 9. Test environment + +What most later steps stand on: + +- **fixture lifecycle extensions:** setup and teardown beyond a constructor + and a destructor, with resources a fixture owns and releases in a defined + order, also when a test fails or is retried; +- **a virtual clock:** time-dependent code is tested without waiting for real + time to pass; a test advances the clock itself; +- **isolated filesystems:** each test gets a directory of its own, removed + after it, so filesystem operations are tested without touching anything + else. + +## 10. Output comparison + +Extends the text snapshots of `<Progmasoft/Catch3/Snapshot.hpp>`: + +- **structured snapshots:** JSON, XML and binary data are compared by + structure, so a reordered key or changed whitespace is not a difference + unless the test says it is; +- **approval testing:** a run writes the output it received beside the + approved reference, and a runner command approves it; +- **golden master testing:** the current behavior of a system is recorded as + reference outputs and kept from changing unnoticed. + +## 11. Asynchrony and concurrency + +- **async testing:** futures, promises and callbacks are awaited with time + limits on the virtual clock of step 9; +- **concurrency testing:** races and deadlocks are looked for by exploring + thread interleavings systematically, with deadlock detection and, where the + compiler has it, ThreadSanitizer. + +## 12. Faults and networks + +- **fault injection:** allocation, disk, network and system-call failures + are made to happen under the test's control; +- **network simulation:** latency, lost connections, packet loss and + timeouts are simulated, without a real network. + +## 13. Property extensions + +- **combinatorial and pairwise testing:** generators that cover parameter + combinations systematically, with an optimized set of combinations; +- **statistical testing:** checks of probability distributions, randomness + and other statistical properties; +- **parallel property trials:** the trials of one property run on the + runner's workers; +- **native fuzzing:** the property engine's choice sequences are mutated + under per-test coverage (step 4), as a fuzzer does. + +## 14. Compile-time and contracts + +- **compile-time testing:** expressions, types and templates are verified at + compile time, beyond Catch2's `STATIC_REQUIRE`; +- **negative compilation testing:** code that must not compile is shown to + fail to compile, through the build systems Catch3 supports; +- **contract testing:** preconditions, postconditions and invariants, and the + contract violations a test expects. + +## 15. Resources and performance + +- **memory leak testing:** leaks are detected per test; +- **resource usage testing:** the runner measures and limits the CPU time, + memory, file descriptors and other resources of each test; +- **performance regression testing:** regressions between versions are + detected automatically from the benchmarks of step 8 and the runner's + history.