File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
main/java/org/utplsql/cli
test/java/org/utplsql/cli Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ public class RunCommand implements ICommand {
126126 )
127127 private boolean enableDbmsOutput = false ;
128128
129+ @ Parameter (
130+ names = {"-random" , "--random_test_order" },
131+ description = "Enables random order of test executions (default: DISABLED)"
132+ )
133+ private boolean randomTestOrder = false ;
134+
129135 private CompatibilityProxy compatibilityProxy ;
130136 private ReporterFactory reporterFactory ;
131137 private ReporterManager reporterManager ;
@@ -241,7 +247,8 @@ TestRunner newTestRunner( List<Reporter> reporterList) {
241247 .failOnErrors (true )
242248 .skipCompatibilityCheck (skipCompatibilityCheck )
243249 .includeObjects (getObjectList (includeObjects ))
244- .excludeObjects (getObjectList (excludeObjects ));
250+ .excludeObjects (getObjectList (excludeObjects ))
251+ .randomTestOrder (randomTestOrder );
245252 }
246253
247254 private ArrayList <String > getObjectList (String includeObjects ) {
Original file line number Diff line number Diff line change 88import java .util .List ;
99
1010import static org .hamcrest .CoreMatchers .equalTo ;
11+ import static org .hamcrest .CoreMatchers .nullValue ;
1112import static org .hamcrest .MatcherAssert .assertThat ;
1213import static org .junit .jupiter .api .Assertions .*;
1314
@@ -104,5 +105,6 @@ void randomOrder_withoutSeed() {
104105
105106 TestRunnerOptions options = runCmd .newTestRunner (new ArrayList <>()).getOptions ();
106107 assertThat (options .randomTestOrder , equalTo (true ));
108+ assertThat (options .randomTestOrderSeed , nullValue ());
107109 }
108110}
You can’t perform that action at this time.
0 commit comments