To maintain test cases and test data, Microsoft Excel is a favourite tool for testers. Compared to the CSV file format, Excel offers numerous features and a structured way to store data. A tester can create and maintain tables of test data in an Excel spreadsheet easily.
Let's create an Excel spreadsheet, named data.xlsx, in the src/test/resources/data folder with the following contents:
In this section, we will use an Excel spreadsheet as your data source. We will use the Apache POI API, developed by the Apache Foundation, to manipulate the Excel spreadsheet.
Let's modify the provider() method to use a helper ...