0
通过使用JUnit 4为我提供Android样本测试项目只有2-3个java文件。 我试图做到这一点。Junit 4亚军在Android测试项目“示例项目”
我的主测试文件。
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
SimpleMathTest.class
// add other classes here (comma separated)
})
public class TestSuite {
}
和我制成另一个测试文件作为JUnit 4中是
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
public class SimpleMathTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
}
但在执行错误显示的时间:
SampleTest:无法启动测试
请给我一些解决方案。
谢谢