Writing tests
Antithesis tests your software by running it (and your dependencies, your workload, and your checkers) in a fault-filled environment, and then analyzing what happens.
To enable this, you provide Antithesis with:
- A driver that exercises the system (often called a workload).
- Optionally, custom properties to test.
- Optionally, code coverage instrumentation.
- Optionally, guidance on what faults to use.
The only thing you absolutely need to provide is item 1: A driver (a.k.a. workload) which exercises your system and may check for user-facing property violations. This could be as simple as a single client or an existing integration test.
At least initially, you don’t need to specify particular properties to test for because Antithesis comes preconfigured with a large set of default properties applicable to nearly every piece of software, including:
- Never running out of memory
- Never crashing
Especially if you’re just starting out, this set of default properties will often be sufficient to find dangerous bugs in your system.
As you add the subsequent items on the list, your testing will become more powerful, finding deeper bugs and giving you more specific feedback.
We suggest working your way down the list in order: starting with just a basic workload (many customers find bugs at this stage); then addiing assertions to your workload and your code; then adding coverage instrumentation and tuning faults as necessary.