Thursday, September 26, 2019

Unit test ordering in maven

Sometimes your unit tests may give different results on different platforms and this might be caused by the order that maven runs your tests.
In Windows maven defaults to run tests in alphabetical order. This is not the case in Linux.
This can fortunately be changed.

<runOrder>String</runOrder>

Using the value "random" could be useful.