Repository navigation
Releases
v0.13.1
v0.13.0
This release bumps our pinned libhegel (hegel-rust) from 0.37.5 to 0.42.4. hegel-rust now tags libhegel releases libhegel-v<version>, and the build downloads the engine from that tag.
The engine now resolves its settings from named profiles, and a Settings field left at its default takes the profile's value: the default profile comes from a hegel.toml in the working directory or an ancestor, the HEGEL_DEFAULT_PROFILE environment variable, or the detected environment (ci on a CI server, workload inside Antithesis, development otherwise). This changes what the defaults mean:
Settings::test_casesleft unset runs the profile's number of test cases, which is 100 unless ahegel.tomlchanges it.Settings::suppress_health_checkleft empty suppresses the profile's set: nothing locally,TooSlowon a CI server.Backend::Autoleaves the randomness backend to the profile (Urandominside Antithesis,Defaultotherwise) instead of the engine's own detection.
Setting a field explicitly overrides the profile, as before.
hegel::test() now rejects a Settings::stateful_step_count below 1 with std::invalid_argument before the run starts. Previously the engine rejected it as a std::runtime_error. The step budget itself is unchanged: each stateful case runs at least one step and at most stateful_step_count of them.
Inside Antithesis, the engine now reports every run's verdict as an always assertion, so a property test is listed and flagged alongside the assertions in the system under test. A property inside a GoogleTest test Suite.Name reports as Suite::Name passes properties; a test defined with HEGEL_TEST or run with an explicit TestLocation reports as <file>::<name> passes properties. Outside Antithesis nothing changes.
The new engine also changes what runs observe:
- A test case may make 2^20 choices before the engine stops it as an overrun, up from 8,192.
- A test whose verdict for the same generated data differs between two runs now fails the run with
Flaky test detected, where it previously kept the first verdict. Discarding a case based on state outside the drawn data, such as a call counter, now trips this. - Shrinking reaches smaller counterexamples in several situations: pairs of draws a test pins together, a draw that only fails at multiples of a round number, a
one_ofwhose shorter failing alternative needs a non-trivial value, and stateful sequences with redundant steps. - The failure database saves a new entry before removing the one it supersedes, so an interrupted shrink no longer loses a failure.
v0.12.1
This patch bumps our pinned libhegel (hegel-rust) from 0.35.0 to 0.37.5.
v0.12.0
Mode, Mode::SingleTestCase, and Settings::mode have been removed.
v0.11.6
This patch adds the HEGEL_THROW_SITE CMake option (default ON). Hegel
names the source position of a failing throw by wrapping __cxa_throw and
forwarding to the real one through dlsym(RTLD_NEXT, ...), which requires
the C++ runtime to be a shared library. Toolchains that link the C++ runtime
statically (for example -static-libstdc++, or a hermetic toolchain with
libc++abi.a) previously failed to link with a duplicate __cxa_throw
definition. Configure with -DHEGEL_THROW_SITE=OFF (or, outside CMake,
compile the library with HEGEL_HAS_THROW_SITE=0) to compile the wrapper
out; failure reports then name the exception type without the throw site.
Thank you to @dotnwat for his contributions.
v0.11.5
This patch adds concurrent stateful testing: stateful tests where rules run concurrently from a number of worker threads. See the documentation for
run_concurrent and ConcurrentStateMachine for details.
It also adds ConcurrentPool<T>, which allows concurrent rules to safely add,
reuse, and consume shared generated values. Stateful invariants now run in full on the initial and final states and are sampled between rules in sequential stateful tests and between rounds (a set of concurrent rule executions) in concurrent stateful tests.
v0.11.4
This patch bumps our pinned libhegel (hegel-rust) from 0.32.3 to 0.32.5.
v0.11.3
This patch bumps our pinned libhegel (hegel-rust) from 0.32.2 to 0.32.3.
v0.11.2
This patch bumps our pinned libhegel (hegel-rust) from 0.30.5 to 0.32.2.
v0.11.1
This patch bumps our pinned libhegel (hegel-rust) from 0.29.0 to 0.30.5.