0% found this document useful (0 votes)
14 views4 pages

Hybrid Automation Framework Overview

The document outlines a hybrid framework for automating applications, detailing its components such as the Generic Utilities Package, Object Repositories using Page Object Model (POM), and Test Scripts. It emphasizes the framework's modular, data-driven, and method-driven characteristics, which enhance test script development and execution efficiency. Additionally, it highlights the advantages of the framework, including easy maintenance, code optimization, and simplified test engineer workload.

Uploaded by

THENMOZHI
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Hybrid Automation Framework Overview

The document outlines a hybrid framework for automating applications, detailing its components such as the Generic Utilities Package, Object Repositories using Page Object Model (POM), and Test Scripts. It emphasizes the framework's modular, data-driven, and method-driven characteristics, which enhance test script development and execution efficiency. Additionally, it highlights the advantages of the framework, including easy maintenance, code optimization, and simplified test engineer workload.

Uploaded by

THENMOZHI
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

- Framework is a set of rules and guidelines or best practices to be followed while automating any

application.
Or
- Framework is a collection of reusable components that means automation test script development,
execution and modification to be easier and faster.

[Link] UTILITIES PACKAGE: -


This is one of the component in the framework which is used for any project. It
contains lots of reusable classes which will be used in the test scripts.

[Link] Utility: -
This class contains all the reusable methods related to database like
1. To connect database
2. To execute Query
3. To close database
4. Validation in ODBC
[Link] Utility: -
This class contains all the reusable methods related to Excel file.
1. To read excel data
2. To write data into excel
3. To read multiple data from excel
4. To read multiple set of data
[Link]: -
This interface contains all the path related to my project like
DBURL, FILEPATH, EXCELPATH
4. CSharpUtility: -
This class contains all the reusable java logic and methods which are used my testscript while
automating.
1. To append random number
2. To get system date
3. To get digits present in alert popup
[Link]: -
This class contains all the reusable methods related to webdriver which reduce the length of code.
1. Maximize window
2. Wait for page load or implicit wait
3. For explicit wait or element to be visible
4. Overloaded methods for Select class
5. To handle popup
6. To perform mouse action
7. For window switching
8. To take screenshot & scrollbar Action
[Link]: -
This is one of the components of the framework. Which is super most class of framework
because every test scripts extends BaseClass. It contains all the configuration methods like
• [AssemblyInitialize]=>for ExtentHtmlReporter
• [AssemblyCleanup]=>stop the ExtentHtmlReporter
• [TestInitialize]=>to open the browser
• [TestCleanup]=>to close the browser

[Link] REPOSITORIES (POM): -

Page Object Model is one of the design pattern which is used to store the objects(elements).
POM concept is used by the developers to develop the web page and it is also used by the automation
engineers to test the web pages.
The main objective of POM is to maintenance and modification of the locator or xpath will be
easier whenever the UI is getting changed. Here we are declaring the web elements by using FindsBy,
selenium annotation using private keyword and we are initializing the web elements in the constructor
using [Link](driver, this) Statement. We are utilizing the web elements in the getter,
setter and business library methods. By using this we are achieving Encapsulation

We have POM pages like

1. LoginPage
2. HomePage
3. Induvidual Home Registration
4. Apartment Registration
5. Details/Update
6. SendSMS
7. Complaint List

[Link]: -
- It contains collection of test scripts. We have to declare each testscript using
[TestMethod] method. We have to provide author name and category. As per the rule of
automation each and every test script should extends BaseClass which contains
Configuration class.

[Link] EXPLANATION: -

- Inorder to execute the test script with multiple inputs or test data, we use an excel and
RunSettings file, so we call our framework a Data driven framework.

- Inorder to avoid writing repetitive steps again and again we use lots of reusable methods, so
we call our framework a method driven framework.

- Since we maintain our framework module wise, we also call our framework a Modular driven
framework.

- Since it is a combination of 2-3 frameworks hence it is called a Hybrid driven framework.


- In the beginning of the execution first it executes the BaseClass which is present in the
Generic package which contains all the MSTest properties like [AssemblyInitialize],
[AssemblyCleanup], [TestInitialize] and [TestCleanup].

-First it executes the [AssemblyInitialize] which contains the code for ExtentHtmlReporter,
then it will execute the Opening the browser which is present in [TestInitialize].

- Then it will execute the [TestMethod] where actual test scripts are written in test script
package, while executing the test scripts it will take the test data from the excel file with the
help of [Link] and performs action on the GUI application by calling
necessary methods present in the POM class.

- Once it executes the test method it will execute the Closing the browser which is present in
[TestCleanup].

- Like this it will execute all the test cases one after the other.

- After the execution of all the test cases it will stop the ExtentHtmlReporter which is present
in [AssemblyCleanup].

- Since we are using ExtentTest it will generate the HTML report, which contains number of
test cases passed, failed and screeshot for the failedscripts.

- Since we have implemented the ExtentTest feature, it automatically take the screeshot of the
failed test scripts and store it the screenshot folder.
ACHITECTURE OF HYBRID FRAMEWORK

[Link] [Link] Management


[Link] 3. GENERIC LIBRARY 5. Test Scripts Tool
<RunSettings>
Resources Utilities TestScripts
<MSTest>
<RunSettings>
<MSTest>
[Link] – C @Test @Test
<Parallelize> <TestParameter>
Method Method
<Workers>1</Workers>
[Link]- C orders(){ editStatus
<Scope>MethodLevel</Scope> } (){ <Parameter>
</Parallelize>
</MSTest> [Link]-C }
<TestRunParameters> <Parameter>
<Parameter name="Url"
value="[Link] /> [Link]-C @Test @Test Microsoft
<Parameter name="docsUrl"
Method Method <TestParameter>
value="[Link] />
</TestRunParameters> [Link]-C addResto( addMenu(
</RunSettings>
){ ){ <RunSettings> Visual Studio
[Link]-I } }
[Link]
@Test @Test
res_name Nandana Palace Method Method
editResto( editMenu(
email nandanapalace@[Link] ){ ){
} }
phone 8952145236
URL [Link]
address Near NH , 7. ExtentReport
Chandapura,Bangalore

[Link] [Link]/ Passed - 200


POM Failed - 25
Screenshot
resources
[Link]
[Link]
[Link] Login Page Home Page
[Link] 1. Continuous Integration
2. Continuous Development
8. Screenshots Registration SendSMS Tool
./Screenshot/[Link]

Advantages of Framework:
• Maintenance of components is easy. As the components are stored in their proper
place systematically.
• Optimization of code: As the lines of code written in testscripts gets reduced a lot.
• Modification of components is easy. As we know what data is fetched from where or
what value is kept where we can modify it whenever required simply.

• It makes the life of test engineer simple. As everything is maintained using tools and
are kept systematically the workload on test engineer gets reduced a lot.

It makes the development of testscripts easier. As we have components for every
purpose and methods for every action.

You might also like