Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In this post, I asked a small question as part of a bigger problem. Since I didn't get responses yet, I put my question here:

Is it reasonable to suppose that JUnit executes test cases sequentially: a test case ends befores the next one starts. Does it differ between JUnit versions (my priority is on JUnit4)? And if not, is there a simple way to force JUnit to execute tests sequentially?

Thank you

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
243 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, by default I believe it runs tests sequentially.

JUnit 4.6 introduced an experimental ParallelRunner to run tests in parallel - I don't know of its current status. I would expect parallelism to remain an "opt-in" feature by default though. (Judging by other answers, it looks like this is now here to stay but in a slightly different form - and still opt-in.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...