Framework
Framework
Framework
1. Mention the name of the framework which ‘you are currently using’ or
which ‘you have hands on experience’.
I focus on the test cases which should be executed in a repetitive manner such as
regression test cases, smoke and sanity test cases.
It depends on Test case scenario complexity and length. I did automate 2-5 test
scenarios per day when the complexity is limited. Sometimes just 1 or fewer test
scenarios in a day when the complexity is high.
In QTP, there is an Object Repository concept. When a user records a test, the
objects and its properties are captured by default in an Object Repository. QTP
uses this Object Repository to play back the scripts.
In Selenium, we call objects as locators (such as ID, Name, Class Name, Tag
Name, Link Text, Partial Link Text, XPath, and CSS). Object repository is a
collection of objects. One of the ways to create Object Repository is to place all
the locators in a separate file (i.e., properties file). But the best way is to use
Page Object Model. In the Page Object Model Design Pattern, each web page is
represented as a class. All the objects related to a particular page of a web
application are stored in a class.
5. Can you tell us what are the total activities that performed by automation
tester with GitHub and Jenkins.
Language: In our Selenium Project we are using Java language. Even though
Selenium supports multiple languages, we are using Java language is just
because most of the automation developers have knowledge on Selenium with
Java.
POM: As per the Page Object Model, we have maintained a class for every web
page & that class holds the functionality and members of that web page.
Separate classes for every individual test.
Packages: We have separate packages for Pages and Tests. All the web
page related classes come under Pages package and all the tests related classes
come under Tests package.
For example, Home Page and Login Page have a separate classes to store
element locators. For the login test there would be a separate class which calls
the methods from the Home Page class and Login Page class.
Maven project, all the tests are kept in the ‘src/test/java‘ and remaining files
(such as config.properties, element locators (POM classes), utility files, test data,
etc.,) kept under ‘src/main/java‘.
Test Base Class: Test Base class (TestBase.java) deals with all the common
functions used by all the pages. This class is responsible for
Utility Class (AKA Functions Class): Utility class (TestUtil.java) stores and
handles the functions (The code which is repetitive in nature such as waits,
actions, capturing screenshots, accessing excels, sending email etc.,) which can
be commonly used across the entire framework. The reason behind creating
Framework
utility class is to achieve reusability. This class extends the TestBase class to
inherit the properties of TestBase in TestUtil.
Properties file: This file (config.properties) stores the information that remains
static throughout the framework such as browser specific information,
application URL, screenshots path etc.
All the details which change as per the environment and authorization such as
URL, Login Credentials are kept in the config.properties file. Keeping these
details in a separate file makes easy to maintain.
Test Data: All the historical test data will be kept in excel sheet (controller.xlsx).
By using ‘controller.xlsx’, we pass test data and handle data driven testing. We
use Apache POI to handle excel sheets.
Maven: Using Maven for build, execution and dependency purpose. Integrating
the TestNG dependency in POM.xml file and running this POM.xml file using Jenkins.
Version Control Tool: We use Git as a repository to store our test scripts.
Extent Reports: For the reporting purpose, we are using Extent Reports. It
generates beautiful HTML reports. We use the extent reports for maintaining
logs and also to include the screenshots of failed test cases in the Extent Report.