package DependencyTest;
import org.testng.annotations.Test;
public class AppFailed {
//This test will be failed.
@Test
public void method1() {
System.out.println("This is method 1");
throw new RuntimeException();
}
@Test(dependsOnMethods = { "method1" })
public void method2() {
System.out.println("This is method 2");
}
}
testng.xml
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
<suite name="test-parameter">
<test name="example1">
<parameter name="dbconfig" value="db.properties" />
<parameter name="poolsize" value="10" />
<classes>
<class name="DataProvider.Xml.TestParameterXML" />
</classes>
</test>
</suite>
No comments:
Post a Comment