我正在尝试使用Robotium来自动化应用程序的测试。 测试用例已记录在案,并且应按特定顺序进行测试。但似乎是这样 Junit按字母顺序运行测试..如何重新排列执行顺序?这是我的测试类的基本结构:
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();
}
}