Provide me Android sample test project with only 2-3 java files,by using JUnit 4. I was trying to do this.
My main test file.
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 {
}
and I made another test file as JUnit 4 that is
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 {
}
}
but at the time of execution Error displays:
SampleTest: Failed to launch test
please give me some solution.
Thanks