-
Improvement
-
Resolution: Unresolved
-
Low
-
None
This leads to the authorship of test files where it is not possible to write tests which do not reset after test.
The call to resetAfterTest should be made immediately before data is inserted for the first time in either:
- a test function
- a helper
It is possible to call resetAfterTest multiple times within a single test, so this is fine.
Generally shared setUp should not create things which must be tidied. We should be careful of how we use it. See MDL-55609 for one example where we saved 10% of the total time required by refactoring tests to be better organised.