Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Difference between @Factory and @DataProvider annotation?

Category: TestNG

@Factory method creates instances of test class and run all the test methods in that class with a different set of data.
Whereas, @DataProvider is bound to individual test methods and run the specific methods multiple times.

Leave a Reply

Your email address will not be published. Required fields are marked *