Sahi Excel Framework is a powerful feature which bridges the gap between domain experts and automation engineers. We had highlighted Sahi Excel Framework in our Five Questions Series here: https://sahipro.com//five-questions-series-sahi-excel-framework/
In this post, we intend to highlight the common mistakes people make while using Sahi for Data Driven Testing
Syntax and Data File Errors:
- Missing = after the variable name.
Some testers seem to read the external file and store the data (array) in a variable. They miss out the = after the variable name.
variableName _readCSVFile(“fileName”)Expected Usage:
- A common mistake observed was the usage of _readCSV, _readExcel instead of _readCSVFile and _readExcelFile.
- Using the incorrect API to read the external files
There are three APIs you need to be aware of: _readCSVFile, _readExcelFile and _getDB. You need to use these APIs based on where you are saving your test data which could be CSV, Excel or a database.
- First column is not empty. There should not be any data under the first column header.
- Mismatch in the header names. The data from the column will not be considered if the header name doesn’t match in the scenario file and data file.
- Keyword and Data are not enclosed in square brackets
- Instead of [variable:header:columnName], many testers have used [variable:header.columnName]
They have used . instead of : and you would notice that the values would not be picked up for the fields.
Which other issues have you encountered while using Sahi Excel Framework for Data Driven Testing? Do let us know through your comments.