TestNG – Dependency Test
In TestNG, we use dependOnMethods and dependsOnGroups to implement dependency testing. If a dependent method is fail, all the subsequent test methods will be skipped, NOT failed. 1. dependOnMethods Example A simple example, “method2()” is dependent on “method1()”. 1.1 If method1() is passed, method2() will be executed. App.java package com.mkyong.testng.examples.dependency; import org.testng.annotations.Test; public class App …