filmov
tv
ExcelReader: Read DataSet w/ ExcelReader.DataSet From Excel In C# Test Automation Scripts tutorial

Показать описание
#TestAutomation #Appium #Programming
In this howto video, I show you how to use ExcelReader and ExcelReader.DataSet.
First I show how to read all rows of Excel table. Then I show how to configure ExcelReader.DataSet such that it considers the first row of every sheet as a header.
I specifically show you how to use this library to read data for test automation purposes.
The ExcelDataReader lets us read test configuration data from an Excel file.
An easy to understand code sample is available on the GitHub Repository of ExcelDataReader. I took that code and customized it to use with an automated test.
In my opinion the best place to load data in a DataSet (System.DataSet) is in the ClassInitialize method.
We can then write utility methods to extract data from various data tables(System.DataTable) according to our own logic.
The most important method call we will make to read data will be ExcelReader.AsDataSet().
Once we read data in a simple way, I will also show you how to use an object of ExcelDataSetConfiguration to make the library treat very first row of an Excel sheet as a header row.
Please note that this code might be used with Selenium, Appium, Coded UI automated tests. It can also be used in non-test automation scenarios as well if need be.
In this howto video, I show you how to use ExcelReader and ExcelReader.DataSet.
First I show how to read all rows of Excel table. Then I show how to configure ExcelReader.DataSet such that it considers the first row of every sheet as a header.
I specifically show you how to use this library to read data for test automation purposes.
The ExcelDataReader lets us read test configuration data from an Excel file.
An easy to understand code sample is available on the GitHub Repository of ExcelDataReader. I took that code and customized it to use with an automated test.
In my opinion the best place to load data in a DataSet (System.DataSet) is in the ClassInitialize method.
We can then write utility methods to extract data from various data tables(System.DataTable) according to our own logic.
The most important method call we will make to read data will be ExcelReader.AsDataSet().
Once we read data in a simple way, I will also show you how to use an object of ExcelDataSetConfiguration to make the library treat very first row of an Excel sheet as a header row.
Please note that this code might be used with Selenium, Appium, Coded UI automated tests. It can also be used in non-test automation scenarios as well if need be.
Комментарии