31. What Are @factory And @dataprovider Annotation?
Answer:
@Factory: A factory will execute all the test methods present inside a test class using a separate instance of the respective class with different set of data.

@DataProvider: A test method that uses DataProvider will be executed the specific methods multiple number of times based on the data provided by the DataProvider. The test method will be executed using the same instance of the test class to which the test method belongs


32. Can you arrange the below testng.xml tags from parent to child?
<test> <suite> <class> <methods> <classes>
Answer: <suite><test><classes><class><methods>


33. How To Run Testng Using Command Prompt?

Leave a Reply