Burst public enum Soda { COKE, PEPSI, RC_COLA } @RunWith(BurstJUnit4.class) public class SampleTest { @Test public void sodas(Soda soda) { // Test will run 3 times assertNotNull(soda); } } Automated Testing
Burst public enum Soda { COKE, PEPSI, RC_COLA } @RunWith(BurstJUnit4.class) public class SampleTest { @Test public void sodasAndSnacks(Soda soda, Snack snack) { // Test will run 9 times assertNotNull(soda); assertNotNull(snack); } } public enum Snack { CHIPS, KITKAT, CANDY } Automated Testing
Burst @TabletOnly public void testTabletFeature() { // This test will only be executed on tablets. } @PhoneOnly public void testPhoneFeature() { // This test will only be executed on phones. } Automated Testing
Tips Automated Testing public class RegisterFailureHandler implements FailureHandler { private final TestCase testCase; public RegisterFailureHandler(TestCase testCase) { this.testCase = testCase; } @Override public void handle(Throwable throwable, Matcher viewMatcher) { // Very useful for finding out what went wrong... takeAndUploadScreenshot(testCase.getName()); // Delegate to real failure handler here. } }