Dependent Test:
==============
Dependency is supported by TestNG,some times ane action may depends on another action.
package testngdemo;
import org.testng.annotations.Test;
public class DependentDemo {
@Test (dependsOnMethods = { "OpenBrowser" })
public void SignIn() {
System.out.println("SignIn");
}
@Test
public void OpenBrowser() {
System.out.println("Open Browser");
}
@Test (dependsOnMethods = { "SignIn" })
public void LogOut() {
System.out.println("Log Out");
}
}
==============
Dependency is supported by TestNG,some times ane action may depends on another action.
package testngdemo;
import org.testng.annotations.Test;
public class DependentDemo {
@Test (dependsOnMethods = { "OpenBrowser" })
public void SignIn() {
System.out.println("SignIn");
}
@Test
public void OpenBrowser() {
System.out.println("Open Browser");
}
@Test (dependsOnMethods = { "SignIn" })
public void LogOut() {
System.out.println("Log Out");
}
}
No comments:
Post a Comment