TestNG Tutorials 47: Marking a Parameter as Optional in TestNG
Hello folks, When we parametrize methods in a TestNG class, we must need to pass parameter values from testng xml. If we do not pass we get an exception. We will see an example below: TestNG class: [java]package Parameters; import org.testng.annotations.Parameters; import org.testng.annotations.Test; public class ParameterTest { @Test @Parameters({“testParameters1″,”testParameters2”}) public void testMethod(String testParameters1, String testParameters2)…
Read More “TestNG Tutorials 47: Marking a Parameter as Optional in TestNG” »