How do I run ordered integrated-tests on Maven? I’d like to run the tests in this order:
- Login.java
- checkbase.java
- blah.java
- Logout.java
It currently runs in alphabetically order, I’d rather not rename the files for testing. I’m using JUnit
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re using the failsafe plugin for running your integration tests, you can specify the order in which the tests will be run by specifying the runOrder parameter, which is valid after version 2.7. From the documentation:
So there isn’t any way to specify that tests are run in an arbitrary order. If you use TestNG however, you can specify the order.
If you’re using the surefire plugin, you have exactly the same parameter, runOrder, with the same values possible.