This repository contains automated tests for the OrangeHRM application using Cypress. The aim is to ensure the functionality and stability of the application through automated UI testing.
- Introduction
- Prerequisites
- Installation
- Running Tests
- Folder Structure
- Custom Commands
- Test Cases Covered
- Contributing
OrangeHRM is a leading open-source human resource management software. This project automates various functionalities of the OrangeHRM application to ensure smooth user experiences and minimize regression issues.
Before you begin, ensure you have met the following requirements:
- Node.js (version 14.x or later)
- npm (Node package manager)
-
Clone the repository:
git clone https://github.com/hasanazeerkhan/orangehrm-automation-cypress.git cd orangehrm-automation-cypress
-
Install the required dependencies:
npm install
To run the tests, use the following command:
npx cypress open
This will open the Cypress Test Runner. From there, you can select the test files you want to run.
For headless execution, you can run:
npx cypress run
The project follows a standard Cypress folder structure:
orangehrm-automation-cypress/
├── cypress/
│ ├── e2e/ # Test data files
| ├── login.cy.js # Spec file which contains test case
│ ├── fixtures/ # Test specifications
| ├── testData.js.js # File which contatins web elements and credentials
│ ├── support/ # Custom commands and global configurations
├── cypress.json # Cypress configuration file
└── package.json # Project dependencies and scripts
└── README.md # Documentation
Custom commands are defined in the cypress/support/commands.js
file. They help to streamline repetitive tasks within tests. Feel free to add your own custom commands as needed.
- Title of the website should be OrangeHRM.
- Logging in with correct and incorrect credentials.
- Forgot password functionality.
- All social handles work correctly.
- URL of the left panel works correctly.
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch
git checkout -b feature/YourFeature
- Make your changes.
- Commit your changes
git commit -m 'Add some feature'
- Push to the branch
git push origin feature/YourFeature
- Open a pull request.