Using it in CI
Everything a pipeline needs is on the command line: repeatable data, output a script can read, and an exit code for every ending.
Commit a recipe, not the data
The same recipe and seed give the same rows and the same damage, byte for byte, on Windows, macOS and Linux. Commit a small recipe next to your tests instead of large fixture files, and generate the data in the pipeline.
qadg quick is the only command whose runs differ. Without --seed it draws a new seed every time and names it on the log channel.
Channels
Data goes to standard output and the log to standard error. A run that fails writes nothing to standard output, and --json gives a machine readable report for validate, generate, --version and --license.
Exit codes
| exit code | name | meaning |
|---|---|---|
0 | OK | the run succeeded |
1 | RUNTIME | a tool failure that belongs nowhere else |
2 | USAGE | wrong invocation syntax or an unknown flag |
3 | CONFIG | a document this run was given is not valid: a recipe, a policy, a manifest or a response record |
4 | EXPECTATION | data was produced, but the application under test did not behave as the manifest says |
5 | DATA | the recipe is valid, but it cannot be satisfied |
6 | IO | a read or a write failed |
130 | INTERRUPTED | stopped by the user |
143 | TERMINATED | stopped by the system |
qadg --help prints the same table.
A step that fails on a wrong answer
qadg generatethe recipe with apolicy, orqadg corrupta file of your own.- Import the damaged data into your application in your test, and write down what it did with each row.
qadg verifythe manifest against that record. Exit code 4 fails the step.
Check what your app did shows the record and what verify prints.