I am trying to use Robotium to automate the testing of an application. The test cases were documented and they are supposed to be test in specific order. But it seems that Junit run the tests in alphabetic order.. how do I rearrange the order of execution? Here is the basic structure of my test class:
public class ETTerminalTest extends ActivityInstrumentationTestCase2<IdleActivity> {
private Solo solo;
private static final Logger LOGGER = LoggerFactory.getLogger(ETTerminalTest.class);
public ETTerminalTest() {
super("com.employtouch.etterminal.ui.activity", IdleActivity.class);
}
protected void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
@Smoke
public void testEnterPin() throws Exception {
...
}
@Smoke
public void testWhatEver() throws Exception {
...
}
@Smoke
public void testSomethingElse() throws Exception {
...
}
@Override
public void tearDown() throws Exception {
try {
//Robotium will finish all the activities that have been opened
solo.finalize();
} catch (Throwable e) {
e.printStackTrace();
}
getActivity().finish();
super.tearDown();
}
}