Skip to content

Tag: testng-dataprovider

TestNG assign programatically DataProvider

If I have a method: Can I create a Listener or something in TestNG, that if I have a method: then it automatically injects specific dataProvider, without explicitly specifying it @Test(dataProvider = “webTarget”) ? Answer Ideally speaking, the easiest way to go about doing this would be to: Define an abstract class in which you define the required data provider