Part 18
83 : What are the benefits of parallelism over normal execution?
Answer : Using parallelism facility of TestNG In selenium webdriver,
- Your software exam execution fourth dimension volition hold out reduced equally multiple tests volition hold out executed simultaneously.
- Using parallelism, We can verify multithreaded code In software application.
84 : I wants to run exam cases/classes In parallel. Using which attribute too value I tin create It?
Answer : You bring to use parallel = classes attribute In testng.xml to run software spider web app tests parallel. VIEW EXAMPLE.
85 : What Is dependency exam In TestNG?
Answer : Dependency Is really proficient characteristic of testng using which nosotros tin gear upwardly software exam method equally subject exam method of whatever other unmarried or multiple or grouping of exam methods. That way depends-on method volition hold out executed rootage too and therefore subject exam method volition hold out executed. If depends-on software exam method volition neglect too therefore execution of subject exam method volition hold out skipped automatically. TestNG dependency characteristic volition industrial plant exclusively If depends-on exam method Is role of same cast or role of Inherited base of operations class. DETAILED DESCRIPTION ON DEPENDENCY.
86 : What Is the syntax to gear upwardly exam method dependency on multiple exam methods.
Answer : We tin gear upwardly exam method's dependency on multiple exam methods equally bellow.
Above exam method Is depends on Login too checkMail exam methods. VIEW EXAMPLE.
@Test(dependsOnMethods={"Login","checkMail"}) populace void LogOut() { System.out.println("LogOut Test code."); }
Above exam method Is depends on Login too checkMail exam methods. VIEW EXAMPLE.
87 : What Is the syntax to gear upwardly exam method disabled.
Answer : We tin usage attribute enabled = false amongst @Test notation to gear upwardly exam method disabled. Syntax Is equally bellow.
Disabled software exam methods volition hold out excluded automatically during execution. VIEW PRACTICAL EXAMPLE.
@Test(enabled = false) populace void LogOut() { System.out.println("LogOut Test code."); }
Disabled software exam methods volition hold out excluded automatically during execution. VIEW PRACTICAL EXAMPLE.