TestNG interview questions - All About Testing TestNG interview questions

Monday 14 October 2019

TestNG interview questions

1) What is default priority if it is not set in?

2) What would be happened if there is -ve priority? 

3) Why -ve priority not gets ignored and will be at higher priority? [Lower the number you set, it will be at higher priority and it is by designed]

4) If the test case has the same priority then how would it be executed? [If there are two methods with the same name in a different class then it will take class-wise in alphabetical orders and run sequentially.]

5) What is the difference between Beforeclass and Afterclass?

6) How can we write our own annotation in TestNG? 

7) Have anyone created own customized listener? 

8) How to run 1000 test cases at a time?

9) Can we run testNG.xml via command prompt? 

10) How do you handle exception in testNG?

11) There is N number of TC and few of them TC are failing, then is there any way to handle it apart from iretry listener? 

12) Can we execute selenium code using a batch file which is managed using the cucumber framework?

13) What is the difference between after group and before a group?

14) How to run test cases in parallel using testNG.xml and what will happen when there is parallel execution using the same data provider?

15) How do you manage, if there are multiple threads are running using TestNG and writing data in an excel sheet? 

16) How to run the same test case multiple times?

17) How to do Cross Browser Testing using Selenium WebDriver?

18) How do you execute multiple test cases in a single web driver instance?

0 comments:

Post a Comment