Skip to content

Writing and automating test cases for Open Source OrangeHRM HR Software. UI Automation framework is based on Page Object Model design pattern and using Selenium, Java, TestNg, Maven, Git, Allure Reports, Log4j.

Notifications You must be signed in to change notification settings

shishurajpandey/OrangeHRM_UIAutomationFrameWork

Repository files navigation

OrangeHRM_UIAutomationFrameWork

Writing and automating test cases for Open Source OrangeHRM HR Software. UI Automation framework is based on Page Object Model design pattern and using Selenium, Java, TestNg, Maven, Git, Extent Reports, Log4j.

This is a Maven project that implements a Page Object Model design pattern using Selenium WebDriver with TestNg written in Java and uses TestNg assertion.

Extent Reports and TestNg have been used to generate the test report.

Functionality

The following flows have been automated:

  1. E2E Test cases of OrangeHRM Login Page.
  2. E2E Test cases of OrangeHRM MyInfo Page.
  3. E2E Test cases of OrangeHRM Recruitment Page.
  4. E2E Test cases of OrangeHRM Admin Page.
  5. E2E Test cases of OrangeHRM Employee performance Page.
  6. E2E Test cases of OrangeHRM PIM Page.

Technologies Used:

• Selenium WebDriver - v3.14 (Open Source)
• JDK 1.8 (Java Development Kit)
• TestNG (Test Unit Framework)
• Log4j (logging API)
• Maven (Build Automation Tool)
• Apache POI API (Read-Write utilities for Excel - Test Data Handling) Eclipse/IntelliJ (Java Editor)
• Extent Report • Browser - Google Chrome/FF

Page Object Model

Page Object Model, also known as POM, is a design pattern in Selenium that creates an object repository for storing all web elements. It is useful in reducing code duplication and improves test case maintenance.

In Page Object Model, consider each web page of an application as a class file. Each class file will contain only corresponding web page elements. Using these elements, user can perform operations on the website under test.

Why Page Object Model?

1) Helps with easy maintenance.
2) Helps with reusing code.
3) Readability and Reliability of scripts
4) Provides structure to Automation Framework. 

Test Framework

  • Selenium is a free (open-source) automated testing framework used to validate web applications across different browsers and platforms.
  • TestNG is a testing framework that is inspired by JUnit and NUnit but introducing some new functionalities that make it more powerful and easy to use. All the functional tests are created using TestNg @Test annonations in src/test/java folder.
  • TestNg assertions has been used for all the test validations.
  • Maven is used as build automation and project management tool. Maven is a POM (project object model) based build automation and project management tool written in Java. Maven is widely used for dependency management in Java. It also provides a predefined folder structure to write the code. We can add different plugins and JARs in our project.
  • Extent Reports has been used for reporting and reports are available after every run at following Path- /MiroAssignment/test-output/Extent.html. Report can be opened in any Web Browser to see detailed results of each run.
  • IRetryAnalyzer and IAnnotationTransformer interface have been used to implement retry logic for failed test cases. Currently retry count is set to 1.

Why TestNg with Selenium for framework?

	1) Easy Maintainability and Reusability
	2) Annotations are easy to understand in TestNg
	3) Easy to group test cases in TestNg
	4) Parallel testing is possible in TestNg
	5) TestNg Supports parameterized and dependency tests
	6) HTML Reports are generated by default in TestNg
	5) Selenium and Testng both are Opensource tools with huge support Online.

Alternatives options available in the market for frontend automation: Cucumber with Selenium, Protractor with Jasmin, WebdriverIO, SerenityJs, Cypress etc.

How to Run the tests

Pre-requisite:

* JDK 8 and above.
* Chrome browser - latest version installed.
* Maven is installed in the machine and configured properly.
* Eclipse IDE or IntelliJ IDEA can be used to run test cases using testng.xml suite files.

1) Using Maven

For Windows OS- Open command prompt and Go the path where the pom.xml is placed and run following command-

mvn clean install

For MacOs- Open the terminal and and Go the path where the pom.xml is placed and run following command-

mvn clean install

About

Writing and automating test cases for Open Source OrangeHRM HR Software. UI Automation framework is based on Page Object Model design pattern and using Selenium, Java, TestNg, Maven, Git, Allure Reports, Log4j.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages