Blog

Latest Updates. News. Insights. Ideas.

March 2017 - Sahi Pro

Common mistakes while using Sahi Excel Framework – Data Driven Testing

Posted by | Sahi, troubleshooting, tutorials, Uncategorized | No Comments

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: http://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.
    Incorrect Usage:
    variableName _readCSVFile(“fileName”)

    Expected Usage:
    variableName= _readCSVFile(“fileName”)Error

  • 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.
    Expected: BlankColumn
  • 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.
    Headers
  • Keyword and Data are not enclosed in square brackets
    [Keyword][Data]
  • 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.
    DataNotPickedUp

Which other issues have you encountered while using Sahi Excel Framework for Data Driven Testing? Do let us know through your comments.

Use fully-loaded Sahi Pro FREE for a month. Download Now Request a Demo