Giter VIP home page Giter VIP logo

excelreader_csharp_automation's Introduction

ExcelReader_CSharp_Automation

A library built based on the C# ExcelDataReader that can be used for reading data from excel for test automation. This library loads the excel and its sheets into a static class which can be shared by multiple automation test scripts. It supports loading multiple excel files.
ExcelDataReader - https://github.com/ExcelDataReader/ExcelDataReader

Excel file format: .xlsx
To read the protected excel files pass password in optional pwd parameter

Functions:

  • ExcelReader.Load(string dataFilePath, optional string pwd)
    Function: Checks whether excel is loaded and if not loads the excel and its sheets.
    return: void
  • ExcelReader.ReadData(string filepath, string sheetName, int rowNumber, string columnName, optional string pwd)
    Function: Returns the column value. filepath acts as the key for the required excel file as multiple files can be loaded at the same time.
    return: column value as string
  • ExcelReader.GetRowCount(string filepath, string sheetName, optional string pwd)
    Function: Loads the file if already not loaded. Returns the row count.
    return: row count as int

Project includes unit tests for the library created using MSTest and Specflow.
ExcelReaderMSTests => MS Test unit tests
SpecFlowExcelReaderTests => Specflow (BDD) unit tests

Azure devops continuous integration (CI/CD) pipeline can be found under below location. The build pipeline triggers the release flow where unit tests - both MS test and Spec flow are run.:
https://dev.azure.com/remyanambala/ExcelReader/

Specflow results:

MSTest results:

How to use this in selenium scripts:
Below is a screenshot of using it in Easy Repro - MS Dynamics 365 Selenium test automation framework.

excelreader_csharp_automation's People

Contributors

remyanambala avatar automate02022019 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.