Closed Garados007 closed 1 year ago
@t-b @MichaelHuth Ready for review.
Nice one!
The shuffling options look good, I also like both levels (test suite and cases). The idea to skip a test suite is also a good.
Comments:
HasProcedureShuffleBan
function work in an IM? GetFunctionTagWave does some magic with ProcedureText to achieve that\\Q
/\\E
out.Fixed.
And who could have guessed? Testing randomness in Igor is pretty ... unpredictable. 😂 I needed special test cases for Igor 7 and 8. 🤷
Very nice solution with IsTagMatch
.
Some comments regarding the tests:
+ // Restore seed to a "random" one
+ seed = DateTime * 1e-6
+ SetRandomSeed seed - floor(seed)
You don't need that. The random seed after a test case is not something anyone should care about.
TestHelper:
That helper looks mostly good. But it misses to check two crucial things. It currently passes when passing an empty expect
wave. And it also passes if TestRunData has more entries than expect
.
So I would add
CHECK_EQUAL_VAR(length, DimSize(wv, UTF_ROW))
CHECK_GT_VAR(lenth, 0)
to nail that down.
Always when writing a loop in a test, you need to ask yourself, "Is it okay if the loop is not executed at all?". And in many cases the answer is no, and thus the above checks are required.
Fixed.
The order of test case execution is now fixed and IUTF now always executes the test cases from the same test suite together. The execution of the test suites are now in that order they are listed in the RunTest call (or alphabetically if regex used).
The code of CreateTestRunSetup is now much simpler and contains less nested loops.
Close #416
The user can now shuffle the execution order of test suites and test cases. It is also possible to opt-out shuffling test cases in specific test suites.
The default execution order is documented alongside the new feature.
Close #375