You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be a runtime paramerer I think.
This way you can easily check for test independency.
Also, do we want to have random or simply reverse order?
On of the principles of xunit test approaches is that tests should be independent and so relying on ordering of tests (outside of before or beforeall annotation) is considered "a bad thing".
Maintaining independent tests means that it is easier to diagnose failed test since the programmer only needs to look at a single test scope to understand everything needed to diagnose.
Enabling this capability feels like a change in direction of ethos of a test suite.
@jgebal I’m just saying that we shouldn’t introduce anything that enables a repeatable order of execution of tests. Random is by definition not reliably repeatable, so fine.
if a 'random' option is available at runtime (or annotation) then maybe a seed number should be output somewhere and allowed to be passed in should you need to recreate a "random run" to diagnose the issue.
Yes. And this feature should be quite easy to implement now (hopefully) since the suote is build by running SQL on cache.
The only thing to confirm is that it will not have negative impact on clients (SQLDeveloper)
The SQL Developer extension does not directly executes the tests. It just calls ut.run or ut_runner.run. Everything is fine as long as it can rely on the sort order provided by the reporters.
Activity
jgebal commentedon Jul 26, 2017
It should be a runtime paramerer I think.
This way you can easily check for test independency.
Also, do we want to have random or simply reverse order?
mathewbutler commentedon Jul 26, 2017
On of the principles of xunit test approaches is that tests should be independent and so relying on ordering of tests (outside of before or beforeall annotation) is considered "a bad thing".
Maintaining independent tests means that it is easier to diagnose failed test since the programmer only needs to look at a single test scope to understand everything needed to diagnose.
Enabling this capability feels like a change in direction of ethos of a test suite.
Just my 0.2c 😀
jgebal commentedon Aug 31, 2017
That is why it should be a runtime parameter, not an annotation I think.
Order (random or not) should not be part of test-suite definition.
I love the idea of random or even simply reverse order of execution in suite.
The ordering should not affect the setup/cleanup order though.
jgebal commentedon Oct 24, 2017
@mathewbutler - It would definitely be a positive change.
mathewbutler commentedon Oct 25, 2017
@jgebal I’m just saying that we shouldn’t introduce anything that enables a repeatable order of execution of tests. Random is by definition not reliably repeatable, so fine.
Shoelace commentedon Oct 9, 2018
if a 'random' option is available at runtime (or annotation) then maybe a seed number should be output somewhere and allowed to be passed in should you need to recreate a "random run" to diagnose the issue.
lwasylow commentedon Feb 26, 2019
Is this still planned?
jgebal commentedon Feb 26, 2019
Yes. And this feature should be quite easy to implement now (hopefully) since the suote is build by running SQL on cache.
The only thing to confirm is that it will not have negative impact on clients (SQLDeveloper)
PhilippSalvisberg commentedon Feb 26, 2019
The SQL Developer extension does not directly executes the tests. It just calls
ut.runorut_runner.run. Everything is fine as long as it can rely on the sort order provided by the reporters.Added support for random order of test execution.
Release/v3.1.7 (#942)