Skip to content

Techical Note on the order of tests

Michael Baas edited this page Jul 21, 2020 · 1 revision

If multiple tests are to be executed, they will (by default) be executed in random order. This is done to help detect unintended side-effects of tests or other dependencies between them. In theory, every test should be a totally independent function that can be executed with any setup - unless set up otherwise by a suite.

If you want to execute tests in default-order (as specified in the suite), use switch -order=1. -order=0(the default) indicates random order, order=2 6 1 3 2 5 is a sample for a pre-determined order. If a sequence of tests fails, the system will remember the last order and re-use it on the next execution. Additionally, the order that was used will also be shown in the log so that it can be explicitly specified when calling ]DTest again (though this shouldn't be necessary by default). The mechanism used for this functionality is described here.