-
Add dependency to yor pom.xml file.
<dependency> <groupId>com.cypher</groupId> <artifactId>dataprovider</artifactId> <version>0.0.2</version> </dependency>
-
Execute the command
mvn install
Use the following code snippet for reading data from csv files and returning the iterator.
@DataProvider
public Iterator<Object[]> dp() throws IOException {
return CsvFileReader.readDataFromCsv(filePath); //filPath is path of the csv file
};
Use the following code snippet for reading data from excel files and returning the object[][] .
@DataProvider
public Object[][] dp() throws IOException {
return ExcelFileReader.readDataFromExcel(filePath); //filPath is path of the excel file
};
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request