Skip to content

Automation testing framework for OrangeHRM, validating employee management, leave processes, and login. Built with Selenium, Cucumber, and TestNG. Supports Excel-based data (Apache POI) and detailed reporting (Extent Reports).

License

Notifications You must be signed in to change notification settings

cihat-kose/orangehrm-test-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrangeHRM Test Suite

Cucumber Selenium TestNG Maven Java Apache POI

Table of Contents

  1. About the Project
  2. Key Benefits
  3. Features
  4. Reporting
  5. Installation
  6. Configuration
  7. Usage
  8. Folder Structure
  9. Dependencies
  10. Contributors
  11. License
  12. Contact

About the Project

The OrangeHRM Selenium Cucumber UI Test Automation framework is an automated testing solution created to validate the core functionalities of the OrangeHRM platform.
This framework leverages Selenium for UI automation, Cucumber for Behavior-Driven Development (BDD), and TestNG for execution and reporting.

The project focuses on automating regression and functional tests to ensure the stability and reliability of the OrangeHRM application.


Key Benefits

  • Automated UI Testing: Tests core HRM functionalities such as login, employee management, and leave applications.
  • Behavior-Driven Development (BDD): Test scenarios are defined in plain English using Gherkin syntax.
  • Detailed Reporting: Generates HTML and PDF reports with test execution details and screenshots for failed scenarios.
  • Data-Driven Testing with Apache POI: Test data is managed using Excel files, ensuring flexibility and scalability.
  • Page Object Model (POM): Simplifies test maintenance and enhances reusability by adopting the POM design pattern.

Features

  • Login Automation: Validates login functionality using Excel data.
  • Employee Management: Automates scenarios for adding, editing, and deleting employee records.
  • Leave Management: Tests for applying, approving, and rejecting leave requests.
  • Report Generation: Extent Reports provides detailed insights into test execution results.
  • Excel-Based Data-Driven Testing: Utilizes Apache POI to read and write test data to Excel files.

Reporting

Test reports are generated after each execution in the target/testReports directory.

  • HTML Report: Located at target/testReports/sparkReport/Spark.html.
  • PDF Report: Available at target/testReports/PdfReport.pdf.

Installation

Option 1: Command Line Installation

  1. Clone the repository:
    git clone https://github.com/cihat-kose/orangehrm-test-suite.git
    cd orangehrm-test-suite
  2. Install dependencies:
    mvn clean install
  3. Run tests:
    mvn test

Option 2: IntelliJ IDEA Installation

  1. Clone the repository:

    • Open IntelliJ IDEA.
    • Go to File > New > Project from Version Control.
    • Enter the repository URL: https://github.com/cihat-kose/orangehrm-test-suite.git.
    • Click Clone.
  2. Install necessary plugins:

    • Ensure Cucumber for Java and Gherkin plugins are installed in IntelliJ IDEA for Cucumber and Gherkin syntax support:
      • Go to File > Settings > Plugins (or Preferences on macOS).
      • Search for Cucumber for Java and Gherkin, install them, and restart IntelliJ IDEA if prompted.
  3. Open the project:

    • IntelliJ IDEA should automatically detect and import the project as a Maven project.
    • Wait for dependencies to download.

Configuration

  • cucumber.properties:
    cucumber.publish.quiet=true
  • extent.properties:
    extent.reporter.spark.start=true
    extent.reporter.spark.out=test-output/SparkReport/Spark.html
    extent.reporter.pdf.start=true
    extent.reporter.pdf.out=PdfReport.pdf

Usage

To run tests, navigate to src/test/java/runners/TestRunnerAll.java and run the file directly from IntelliJ IDEA or execute the following command:

mvn test

Folder Structure

orangehrm-test-suite/
│
src  
└── test  
    ├── java  
    │   ├── featureFiles         # Cucumber Feature Files  
    │   ├── pages                # Page Object Model (POM) Classes  
    │   ├── runners              # Test Runners  
    │   ├── stepDefinitions      # Step Definitions  
    │   └── utilities            # Utility Classes  
    ├── resources  
    │   ├── cucumber.properties  # Cucumber configuration  
    │   ├── extent.properties    # Extent Report configuration  
    │   └── TestCasesTeam1.xlsx  # Test Data (Excel)  
    │── target                  # Test output and reports  
    └── pom.xml                  # Maven configuration file

Dependencies

The dependencies for this project are managed in the pom.xml file and include:

  • Selenium – UI automation
  • Cucumber – BDD testing framework
  • TestNG – Test execution and management
  • Apache POI – Excel data handling
  • ExtentReports – Test reporting

Contributors

To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Contact

For any questions or contributions, please open an issue in this repository.

About

Automation testing framework for OrangeHRM, validating employee management, leave processes, and login. Built with Selenium, Cucumber, and TestNG. Supports Excel-based data (Apache POI) and detailed reporting (Extent Reports).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published