I have two test classes written using junit
- TestClass1
- TestClass2
If we need to ensure that TestClass2 is run only after TestClass1 in executed. How do we achieve this?
I have two test classes written using junit
If we need to ensure that TestClass2 is run only after TestClass1 in executed. How do we achieve this?
You can achieve this using the Junit test suite. When you specify the list of classes to be executed in a test suite, you're defining an array, and these test classes will be executed in order, except when you're doing parallel execution.
Note that JUnit does not guarantee the order of execution of tests within a class.