I want to execute test methods which are annotated by @Test
in specific order.
For example:
public class MyTest {
@Test public void
See my solution here: "Junit and java 7."
In this article I describe how to run junit tests in order - "just as in your source code". Tests will be run, in order as your test methods appears in class file.
http://intellijava.blogspot.com/2012/05/junit-and-java-7.html
But as Pascal Thivent said, this is not a good practise.