Is there a way to set test running order in android?
I use Espresso framework and need to test a lot of activities and transitions between them. I want to write differen
You have 3 ways:
way 1: JUnit 4 and 5 work
@Test
public void testFunctionMain() {
test1();
test2()
test3();
}
way 2: JUnit 4 and 5 work
use @FixMethodOrder
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@RunWith(AndroidJUnit4::class)
class LoginActivityTest {
}
way 3: Junit5 work
use @Order
@Test
@Order(2)
public void testFunction(){
}