Basic To Advanced Selenium Java Full Course - Session 13 - TestNG - Ignore Tests,Parallel Execution

Published: 09 June 2022
on channel: QASCRIPT
1,659
7

Test NG - Ignoring Tests:
TestNG allows to ignore test methods for:
Class To ignore all tests in the class
Particular package To ignore all tests in a particular package
@Ignore annotation is used to ignore test methods
It is equivalent to @Test(enabled=false)

Test NG - Parameters:
TestNG allows to define any number of parameters in test methods
Parameters can be passed with the @Parameters annotation
@Parameters annotation can be placed on any method that has @Test, @Before/@After
XML parameters are mapped to the Java parameters in the same order as they are found in annotation
Parameters can be declared either under a suite or test tag
If two parameters have same name, one defined in test will have precedence
Data Provider is a method on the class that returns an array of objects
Data Provider method is annotated with @DataProvider

Test NG - Parallel Execution:
TestNG allows us to run our tests in parallel in different threads
parallel = “methods” : Each test method will run in separate thread
parallel = “tests” : Each test will run in separate thread
parallel = “classes” : Each class will run in separate thread
Number of threads can be specified by the thread count attribute


On this page of the site you can watch the video online Basic To Advanced Selenium Java Full Course - Session 13 - TestNG - Ignore Tests,Parallel Execution with a duration of hours minute second in good quality, which was uploaded by the user QASCRIPT 09 June 2022, share the link with friends and acquaintances, this video has already been watched 1,659 times on youtube and it was liked by 7 viewers. Enjoy your viewing!