Reply to comment

Eclipse Code Templates for TestNG DataProviders

Printer-friendly versionPrinter-friendly version

If you use Eclipse & TestNG you might be interested in these two simple code templates that will help you to create DataProviders.

I use Eclipse, I use TestNG and I like very much DataProviders.

Below I publish two code templates for Eclipse, that let me create tests with DataProviders in no time.

name: dataProvider

@DataProvider(name = "${dataProviderName}")
public Object[][] ${dataProviderMethodName}() {
return new Object[][] { ${cursor} };
}

name: dataProviderTest

@Test(dataProvider = "${dataProviderName}")
public void ${testMethodName}(${cursor}) {
}
No votes yet

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.