scala - How make tests always run in same order in Scalatest? -


we use spec trait our tests in scalatest. when run entire suite, not run in same order. answers in google suggest defining suite , specifying test names. requires add test name every time add new test.

is possible use discoverysuite , define test execution order? run tests in alphabetical order. looked @ extending discoverysuite discoverysuite seems private scalatest.

---more info----

by ordering mean, if there tests a, b, c.

 class extends spec  {..} class b extends spec  {..} class c extends spec  {..} 

then want tests run in order (a, b, c). happens is, run in different order everytime.

discoverysuite private scalatest, yes. execution order of tests in spec (now called funspec, way) defined order of appearance in source file. define order of test classes themselves, need define nestedsuites method , run wrapper suite instead of using discovery. can go using discovery once no longer need order. i'll @ adding defined order discoverysuite in next scalatest release.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -