Improved dependency resolver and tests #3144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes to test execution order can result in unexpected defects and create uncertainty, which is the exact opposite of what we want. The dependency resolver is improved to be more hands-off and leave more tests in original order.
Why: backwards compatibility
During development of the test execution reordering feature #3092 backwards compatibility was discussed. Automatic dependency resolution will be optional in 7.x and default for 8.x.
How: improved dependency manager
The current resolver has a speed optimization that always sorts all independent tests to the front before looking at tests with dependencies. While this produces a technically correct execution order, it produces 'noise' by moving tests around more than necessary. The simplified resolver returns a more natural execution order:
A_independent
A_independent
A_independent
B_dep_on_A
C_independent
B_dep_on_A
C_independent
E_independent
C_independent
D_dep_on_C
B_dep_on_A
D_dep_on_C
E_independent
D_dep_on_C
E_independent
Changed functionality and impact
--debug
or relying on an exact sequence of tests when loggingSoftware design and testing
TestSuiteSorter
dependency resolver now is simpler and checks all tests at least onceTestSuiteSorter
TextUI
end-to-end tests