Fournissez-moi projet de test d'échantillon Android avec seulement 2-3 fichiers java, en utilisant JUnit 4. J'essayais de le faire.Junit 4 coureur dans le projet d'essai android "Sample Project"
Mon fichier de test principal.
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 {
}
et je fait un autre fichier de test JUnit 4 qui est
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 {
}
}
mais au moment de l'exécution affichages d'erreur:
SampleTest: impossible de lancer essai
s'il vous plaît donnez-moi une solution.
Merci