Open Bug 1615537 Opened 5 years ago Updated 3 years ago

Add an option to repeat a set of tests sequentially

Categories

(Testing :: Mochitest, enhancement, P3)

Version 3
enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

Details

(Whiteboard: dev-prod-2020)

Sometimes, I have test failures (e.g. in b.js) because a previous test (a.js) had an unexpected impact on the failing test. In such case, I want to be able to run those 2 tests one after the other, eventually multiple time so I can reproduce an intermittent failure (and then assert it's fixed).

Today, if I run ./mach mochitest a.js b.js --repeat 3, the tests will run in this order

a.js
a.js
a.js
b.js
b.js
b.js

which doesn't really exercise the impact of a.js on b.js

It would be nice if we could have another flag to indicate we want the tests to run like this instead:

a.js
b.js
a.js
b.js
a.js
b.js

I know there's the --shuffle option, but I'm not sure it does this exactly.

One thing you can do currently is run the directory or manifest with --repeat:

./mach mochitest path/to/yourtests --repeat 3

You can comment out or delete manifest entries that you don't want to run.

Priority: -- → P3
Whiteboard: dev-prod-2020
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.