This repository contains automated test cases for the OrangeHRM web application using Cypress and JavaScript. The test suite covers various scenarios, including login, profile updates, and searching for accounts.
The test cases included in this project are:
- Test Login with Valid Credentials: Validates the login functionality using valid credentials.
- Test Login with Invalid Credentials: Validates the login functionality using invalid credentials.
- Test Update Nickname: Tests the ability to update the user's nickname.
- Test Update Profile Picture: Tests the process of updating the user's profile picture.
- Test Search with Existing Person: Tests searching for an existing person in the system.
- Test Search with Non-Existing Person: Tests searching for a non-existing person in the system.
You can watch a sample demo of the tests using Cypress UI here .
demo.open.mp4
You can watch a sample demo of the tests using Cypress cli here .
demo.run.mp4
- Cypress Version: 12.16.0 (stable)
- System Platform: Linux (Ubuntu 22.04)
- Browser: Google Chrome Version 114.0.5735.198
To run the tests, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install Cypress if you haven't already using
npm install cypress
. - Start Cypress by running
npx cypress open
. - In the Cypress test runner, click on the test spec file you want to run (e.g.,
LoginPage.cy.js
) to execute the tests.
To configure the test data, update the values in the Fixtures files, typically found in the /cypress/fixtures
directory.
// Example of configuring login credentials in data.json
{
"url":"https://opensource-demo.orangehrmlive.com/web/index.php/auth/login",
"login":{
"username": "Admin", //add your new username
"password": "admin123" // add your new password
},
"diffdata":{
"nickname":"Bebo",
"keyword":"Sara.Tencrady"
}
}