Directory Image
This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Privacy Policy.

Designing and Execution of Selenium test Automation Framework

Author: Info Campus
by Info Campus
Posted: Feb 16, 2019

Selenium people group gives a suite of devices to web application testing, out of which Selenium WebDriver a propelled device is having local help with various programs. This implies it can discuss straightforwardly with programs and controls activities performed on them, consequently supporting computerization of web applications.

The test mechanization system is a cross breed structure actualized utilizing Selenium WebDriver and TestNG. It consolidates the highlights of Keyword driven, Modular and Data driven structures.

There are distinctive segments accessible in this system, significant ones being:

1. TextNG Xml:-

This is the activating purpose of the system. It incorporates a rundown of test suites to be executed for current run. TestNG XML empowers group execution of testscripts.

2. TestScripts:-

Testscript bundle incorporates a lot of java classes that actualizes the nonexclusive highlights of the structure. Different class records in the testscript bundle are:

  • CommonFunction.java
  • DriverScript.java
  • Keywords.java
  • Module 1.java... Module N.java

CommonFunction.java is the nonexclusive library containing open and static strategies that can be utilized over any task. This incorporates selenium training in Bangalore usage of all application free techniques utilized in the system and different tasks performed on web components. DriverScript oversees and controls total execution of the system by stacking all utilities and setup records. It screens the execution of testscripts.

Keywords.java class contains the meaning of all watchwords utilized over the system. These watchwords are actualized at operational dimension. Module.java – The structure is particular in nature and contains testscripts that are appropriated crosswise over various business modules, each having a different java class. These classes are named dependent on the module name and actualize strategies explicit to a specific module.

3. Config bundle:-

Config bundle contains all setup settings and log documents including:

  • Application.log
  • Config.properties
  • Selenium.log
  • Module 1.Objects.properties
  • Module 1.controller.xlsx

The system utilizes Log4j Logging Services to produce execution logs.

Module.Objects.properties is the vault for all item definitions utilized in the test contents. We use properties record to store and recover the UI components of an application or a site. It contains id of the components, name, xpath, CSS selector and so forth.

Module.controller.xlsx contains different exceed expectations sheets with each sheet having successive stream of exercises for a particular business situation. There is a solitary "suite" sheet which records all test situations explicit to the module with Run Mode esteem "Y" or "N".

4. DataTable:-

Xlfile_Reader is a conventional library that actualizes exceed expectations document control techniques. This structure underpins just exceed expectations records as info information feed. It utilizes Apache POI API to peruse information from exceed expectations documents and compose results in exceed expectations records.

5. Reports:-

ReportUtil.java document actualizes the altered test announcing highlight of the system and produces tweaked test reports at each progression of execution.

6. Util:-

Util bundle incorporates different setup documents which actualize highlights like Database availability, Email design setting and that are just the beginning. It contains the different reusable classes and techniques for generally keep running selenium courses in Bangalore of the test suite. DbManager class covers DB network settings and execute Query, MonitoringMail class actualizes email notice highlight, TestConfig class incorporates arrangement subtleties for mail/db servers, TestUtil class empowers screen catch, Zip Reports and get current date time.

Test Execution Flow:

The structure is driven through TestNG XML. While running TestNG XML, it executes the test suite which is really a cluster of test situations. As each test situation runs, it calls the exceed expectations library which will interface with the fitting test information exceed expectations record and get information which is required for the present test. When test information is perused, each test interfaces with business and conventional libraries to run the real test. With the test execution in advancement, we have log4j to compose the outcome in support/log documents.

About the Author

Infocampus is a training institute that offers training on different technologies. Call 9738001024 for more details. Enquire at http://infocampus.co.in

Rate this Article
Leave a Comment
Author Thumbnail
I Agree:
Comment 
Pictures
Author: Info Campus

Info Campus

Member since: Dec 10, 2016
Published articles: 413

Related Articles