You have the following annotation @FixMethodOrder.
You can use it with the following parameter : MethodSorters.NAME_ASCENDING.
The code (an example) :
@RunWith(AndroidJUnit4.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class YourTestClass {
@Test
public void A_Test() {
System.out.println("1");
}
@Test
public void B_Test() {
System.out.println("2");
}
}
You will find more detailed solutions here : [previous answers] (Test order with espresso)
You can do that using the @RunWith annotation. You can have a short look here Aggregating tests in suites. Basically what you have to do is the following :
Edit:
@RunWith(Suite.class)
@Suite.SuiteClasses({
TestFeature1.class,
TestFeature2.class,
TestFeature3.class,
TestFeature4.class
})
public class FeatureTestSuite {
// the class remains empty,
// used only as a holder for the above annotations
}