package TestNG;
import org.testng.annotations.Test;
public class LearningTestPriority {
@Test
public void Login() {
System.out.println("Login to the application");
}
@Test(dependsOnMethods= {"Login"},priority=-1)
public void Navigation() {
System.out.println("Navigate the details page");
}
@Test(dependsOnMethods= {"Navigation"})
public void Logout() {
System.out.println("Logout from the Session");
}
@Test(dependsOnMethods= {"Login"})
public void HomePage() {
System.out.println("Going to Home Page");
}
}
--------------------
Output
-------------------
[RemoteTestNG] detected TestNG version 7.3.0
Login to the application
Navigate the details page
Going to Home Page
Logout from the Session
PASSED: Login
PASSED: Navigation
PASSED: HomePage
PASSED: Logout
===============================================
Default test
Tests run: 4, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 4, Passes: 4, Failures: 0, Skips: 0
===============================================
#kazacademy #kazonline
Nice post .... output helps to understand the program step by step.
ReplyDeleteThanks
Thank you very much
DeleteAppreciating post
ReplyDeleteThank you very much
DeleteMarvelous post
ReplyDeleteThank you very much
Delete