Robot class. Now, for each line a new test is generated . In this example we will see how to pass the data to Dataproviders by reading the data from excel sheet. Data Providers. Thanks. When you need to pass complex parameters or parameters that need to be created from Java (complex objects, objects read from a property file or a database, etc…), in such cases parameters can be passed using Dataproviders. Click for more details. But here we need to make sure that the array returned by the dataprovider should match with the test method parameters. Note: You need to import the DataProvider in TestNG by adding the line import org.testng.annotations.DataProvider;. Showing 1-1 of 1 messages. Testng dataprovider csv. I thought to share with you guys a flexible way of defining TestNG DataProvider. @dataProvider annotation in TestNG; To run the @Test multiple times with different inputs, we can use data provider option present in TestNG ... Reading a CSV file with Column Index [ Apache Commons CSV] Reading a CSV file with Column Name [ Apache commons CSV] Reading a CSV file with Header Auto-detection. Please suggest . JUnit und TestNG sind zweifellos die zwei beliebtesten Unit-Testing-Frameworks im Java-Ökosystem. thanks. To read a CSV file, select CSV File from the Source Type dropdown. Given my data CSV file: jones;1293039, smith;2938949, johnson;1203939, clark;8293044 And my DataProvider: @DataProvider(name="data") public Iterator