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.