1 package test.configurationfailurepolicy; 2 3 import org.testng.annotations.BeforeMethod; 4 import org.testng.annotations.Test; 5 6 public class ClassWithFailedBeforeMethodAndMultipleTests { 7 8 @BeforeMethod 9 public void setupShouldFail() { 10 throw new RuntimeException("Failing in setUp"); 11 } 12 13 @Test 14 public void test1() { 15 16 } 17 18 @Test 19 public void test2() { 20 21 } 22 } 23