When you launch a replica run
command, the following steps happen:
- The tool list tests that can be direcly executed
(those that don't have any test in their
require
fields). - For each of these tests, here are the steps:
0. The test is declared as
pending
, we skip it and pass to the next one.- Move to the directory defined in
workingDir
, if any. - Run the
beforeTest
, if any and collect the output. - Run the
afterTest
. - Check the exit status of the tested command. If
mustSucceed
is set and the exit status is not valid, me stop here and the test failed. Otherwise, we continue. - Retrieve the expected content for the standard output
and if
outputFile
is defined, for the generated file. - Compare the result of the command with the expectations, either:
- We got the expected result and the test succeeded.
- There's a mismatch and we continue.
- If
replica
is run in interactive mode, the difference between the expected values and the given values are displayed, and the user can set/replace the values for the test.
- Move to the directory defined in
- The tests that didn't explicitly failed are removed of the
require
field of the remaining tests. - If at least one tests succeeded and there is at least one test left, we loop. Otherwise, we show the results.