https://github.com/greatrifat/orangehrm-selenium-python
Automated testing for OrangeHRM using Selenium and Python unittest. Includes both data-driven and hardcoded test cases, with HTML reports and test data from Excel files.
https://github.com/greatrifat/orangehrm-selenium-python
html-report orangehrm selenium test-case test-report unittest
Last synced: 10 months ago
JSON representation
Automated testing for OrangeHRM using Selenium and Python unittest. Includes both data-driven and hardcoded test cases, with HTML reports and test data from Excel files.
- Host: GitHub
- URL: https://github.com/greatrifat/orangehrm-selenium-python
- Owner: greatrifat
- Created: 2025-01-10T19:52:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-17T15:30:42.000Z (12 months ago)
- Last Synced: 2025-03-16T12:34:13.128Z (10 months ago)
- Topics: html-report, orangehrm, selenium, test-case, test-report, unittest
- Language: Python
- Homepage:
- Size: 232 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# OrangeHRM Automation Testing
This repository contains automation testing scripts for the OrangeHRM web application using **Selenium**, **Python**, and **Unittest**. The project is structured into separate folders for data-driven tests and hardcoded tests.
## Project Structure
```bash
OrangeHRM/
│
├── DataDrivenSeleniumOhrmPy_unittest/
│ └── Contains scripts for data-driven testing using Excel files.
│
├── HardCodeSeleniumOhrmPy_unittest/
│ └── Contains scripts for hardcoded test cases.
│
├── Test_Results_DD/
│ └── Stores HTML reports for data-driven test results.
│
├── Test_Results_HC/
│ └── Stores HTML reports for hardcoded test results.
│
├── TestCase_Ohrm.xlsx
│ └── Excel file containing test cases for testing.
│
├── data.xlsx
│ └── Sample login data for data-driven tests.
│
└── README.md
```
## Features
- **Data-Driven Testing**: Automates login functionality using data from an Excel file.
- **Hardcoded Tests**: Validates login functionality with predefined inputs.
- **HTML Test Reports**: Generates comprehensive reports for test results.
- **Python Selenium Automation**:
- Performs login with valid and invalid credentials.
- Handles elements dynamically (e.g., login, logout, error messages).
## Prerequisites
Before running the tests, ensure you have the following installed:
- Python 3.10 or later
- Google Chrome browser
- ChromeDriver
- Required Python modules:
- `selenium`
- `openpyxl`
- `HtmlTestRunner`
You can install the necessary Python modules using:
```bash
pip install selenium openpyxl HtmlTestRunner
```
## Usage
Running Hardcoded Test Cases
1. Navigate to the HardCodeSeleniumOhrmPy_unittest folder.
2. Execute the test script:
```bash
python test_script_name.py
```
## Viewing Test Reports
Test results are stored in **Test_Results_DD/** for data-driven tests and **Test_Results_HC/** for hardcoded tests.
Open the HTML files in a browser to view detailed reports.
## Contribution
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to create an issue or submit a pull request.