Topics In Demand
Notification
New

No notification found.

Automated Testing Framework built on Selenium with C#
Automated Testing Framework built on Selenium with C#

344

0

Automated Testing Framework built on Selenium with C#

Why Automation testing over manual Testing??

The biggest pro of automation testing over manual testing is that it allows you to do more testing in less time and greater efficiency. It increases productivity and ensure greater test coverage.

Introduction to Selenium with C#

Selenium is undoubtedly the most popular tool for test automation. Quite often, Selenium needs to be used with C# and Visual Studio IDE together for a better-automated testing experience.

Using Selenium, C#, and Visual Studio together provides a unique opportunity to create a robust, scalable, and flexible automation framework.

Why the selenium with C# going to help us?

The importance of automation testing cannot be overstated. Within narrow deadlines and changing customer demands hovering over them, QAs must automate numerous tests, test cases, and projects to meet said deadlines, save time, effort and get error-free results

What are the types of frameworks in Selenium?

Selenium frameworks based on the functional approach are classified into three main types:

  • Data-driven framework
  • Keyword driven framework
  • Hybrid framework

ds

Data-Driven Framework

Data-driven framework separates the test data from script logic, meaning testers can store data externally. Setting up a data-driven test framework will allow the tester to store and pass the input/ output parameters to test scripts from an external data source, such as Excel Spreadsheets, Text Files, CSV files.

Keyword driven framework

 Keyword-driven framework, each function of the application under test is laid out in a table with a series of instructions in consecutive order for each test that needs to be run. In a similar fashion to the data-driven framework.

Hybrid framework

Hybrid Driven Framework is a combination of data-driven and keyword-driven frameworks. This framework uses different keywords and data sets, where the list of inputs and the functions are stored in separate files. Like the data-driven framework, it also uses the same code for different data sets.

 

ij

 
   

                                                                                                               

Reason behind the using Hybrid Automation Framework

  • Created a high-level test plan providing visibility on effort estimation, deliverables, and test approach
  • Developed the framework where all the test cases, test data, test scenarios & application objects would be defined in a workbook
  • The test automation solution generates both individual and consolidated reports of the all the applications which provides in-depth insights of test run with success & failure of the test cases.
  • In test run information, each step data is recorded and will display with its status. If any failure, a screenshot is provided for the step where it failed and helps application owner to know why step has failed.
  • Reports are being generated using HTML and CSS and are fully customizable.

Automated Testing Framework Solution

Understand their needs and proposed a Hybrid Framework using Selenium and C# which would take advantage of both data and keyword-driven testing features of Selenium.

Creating a new Hybrid Test Automation framework specific to the customer which will be used for all the individual applications. The Hybrid framework is built using C#, Microsoft Unit Test, and Selenium Web driver.

Execution Flow of Hybrid Framework

Components of the Hybrid Framework are like those of the Keyword Driven Framework wherein all Test Data and Keywords are externalized, thus creating scripts in a more generalized form. Components of Hybrid Framework are as follows:

  1. Function Library
  2. Excel Sheet to store Keywords
  3. Design Test Case Template
  4. Object Repository for Elements/Locators
  5. Test Scripts or Driver Script

Execution Flow of Hybrid Framework

ml

The Customer Challenge

 

Requirement was to automate the mission-critical line-of-business applications which were used to create publication records, translate them in different formats. Challenges faced was to maintain the top-notch quality of these application with huge content. The existing and new set of applications that were added required many resources for testing and maintenance.

The major challenges included:

  • Improve application quality by automating all backlogs/test cases
  • Testing application for large system and user dataset
  • Sum up the info from the individual application owner
  • Triggering Test Automation once the patch is released
  • Consolidated report

The customer was looking for a complete Test Automation Solution for all the applications with the individual and consolidated report. Each Test Automation Solution had to be placed in the application specific location for Continuous Integration (CI)/ Continuous Delivery (CD).

 

Benefits of using selenium with C#

  • Enhanced System reliability
  • Improved operational excellence
  • Lower maintenance cost
  • Increased Test coverage
  • Cycle Time Reduction
  • Reusable assets for future releases
  • Achieve higher quality
  • Reduced Business Expenses

 

About the Author:

Hema Muniyappa is a full time QA Test Analysist currently @Version1 with around 8.5 years of IT industry experience and specializes in application Automation TESTING using selenium with C#, MANUAL TESTING, API Testing, Accessibility Testing AND Performance Testing.

My experience includes working on projects involving .Net. MVC and Share Point. Enjoying working on exploring new technologies.

LinkedIn: https://www.linkedin.com/in/hema-hemu-23247382/


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


© Copyright nasscom. All Rights Reserved.