The purpose of this project is to create an automation framework for UI and API testing using best practices, applied for the following modules using a test plan.
The framework contains the automation of some modules from the website demo.orangehrmlive.com/
Module | Number of Scenarios | Status |
---|---|---|
Login | 5 | ✅ |
User profile | 5 | ✅ |
Dashboard | 5 | ✅ |
- Successful login.
- Attempt to Login with empty fields.
- Attempt to Login with invalid credentials.
- Attempt to Login without password.
- Attempt to Login without email.
- Logout
- Navigate to About section.
- Navigate to Support section.
- Navigate to Change password page.
- Attempt to close users profile.
- Verify Time at Work section title.
- Verify My Actions section title.
- Verify Quick Launch section title.
- Verify Employees on Leave Today section title.
- Verify Buzz Latest Posts title.
- Verify Employee Distribution by Sub Unit section title.
- Verify Employee Distribution by Location section title.
For the API testing it was required to be automated 3 request to the Marvel Comics API Marvel Developer Site.
-
Automate that all the characters can be fetch.
-
Automate that all the comics for Spiderman can be fetch.
-
Automate that all characters for the X-Man comic can be fetch
- Javascript.
- Nodejs.
- Playwright
- ngneat/falso
- GitHub Actions
- Sonar Cloud
- dotEnv
- Prettier
- husky
- Lint-staged
-
Node.js must be installed in order to run the project.
-
Go to Marvel's developer website and create an account to get a public and a private API key
(this is required for API testing)
.
- Clone the repository from Github.
git clone https://github.com/elraffy/Senior-QA-Challenge-Raffy-Rodriguez.git
- Install all packages and dependencies for the project.
npm install
- Configure the credentials for UI and API:
Go to the root of project and locate the .env
file, open open it and add the credentials for the website.
USER_NAME = user_name
USER_PASSWORD = password
After creating the Marvel API account, go to the website MD5 Hash Generator to create a Hash using the credentials gotten from the Marvel's API account.
Then go to the root of project and locate the .env
file, open open it and add the credentials for the website.
replacing the values with the ones gotten from Marvel's developer website after creating the account.
PUBLIC_KEY = my_PublicKey
HASH = hashFromMD5
- Other requirements like timestamp will be included on the
.env
file.
- Run the tests using the cypress Test Runner by typing on the terminal the command:
npm run test
- Run the tests on debug mode by typing on the terminal the command:
npm run test-debug
This will automatically run all test and generate the report at the end of execution.
-
It was used the POM design pattern combined with Javascript and cypress best practices.
-
All The API successfull requests for positive scenarios were also validated using the postman tool and the collection will be included in the project just in case that is required to validate some information.
-
To test with postman or other third party, will be required to get a hash that can be generated by going to Hash generator and doing the following steps:
-
Go to the Hash generator website.
-
On the text-area field paste the API keys preceded by the number
1
that will works as aTimestamp
.
` 1 + Marvel's API privateKey + Marvel's API publicKey`
- Click the generate button to get the hash required for API testing.
-
Contributions are always welcome!
- Feel free of fork this project, create your own branch, commit your changes and do your pull request.