by Mohamed Ahmed Borhan, 2019/08/06
This project handle some use cases for the user to validate some scenarios on the e-commerce site
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
Download the repo
-
Import the the project in Visual studio code or any
-
Make sure to install node and cypress from the terminal
-
for windows run "npx Cypress run"
-
Check for detailed steps here
-
Cypress Test Runner will open with all specs that created
-
Press run all
- Visual studio code
- Node Js
- Cypress
- Travis for CI
Cypress is very useful tool for running tests but some times it need to run it many times to get actual results, it some times if there was internet connection or any api call failed
- Item validations
1.1 Check that item price displayed
1.2 Check that item title displayed
1.3 Check that weight of the item is displayed
1.4 Check that item return policy displayed
1.5 Check that users reviews are at least 1
- Cart validations
2.1 Check that item price is like the item details price
2.2 Check that item title is like the item details price
2.3 Check that voucher code is not available
- Checkout validations
3.1 Check that login form appear
3.2 Check that Create account button appear
There is .travis.yml That is responsible for running the builds the first line in the script is responsible for running cypress scripts
Some times in cypress you will need to rerun to get actual results
This is my CI runs
==================================================================================================================================================================================
This is a postman project make validation checks on Some Marvel Api's.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
Download the repo
-
In this path Automate_Cypress_Postman/tests please find the attached collections
-
Make sure to import Trivago.postman_collection.json to your postman collection
-
Make sure to import Trivago.Variables.postman_environment.json in the environment variables
- Postman
-
Open postman
-
Import Trivago.postman_collection.json to your postman collection
-
Import Trivago.Variables.postman_environment.json in the environment variables
-
Change the data that you want to configure like the (time stamp , apikey ...) from the environment variables
-
Create new runner in postman from this collection
-
Make sure that all the requests are selected
-
Configure your runner settings (number of iterations, environment , delay,...)
-
Press Run
-
Test for all authorization error codes listed here with their correct error message for series api
-
Verify the status code is equal to 200 and that the response payload matches the Comic type definition (first level only, not going deeper into CharacterList or other types, only confirming that it is a list with items) for specific Comic api
-
Verify the name of a character is "Spider-Man (Ultimate)" and that the last modification was later than January 2014. Please also ensure, that the provided thumbnail is a valid image URL for specific Character api
-
Verify that calling invalid endpoint should NOT return "Spider-Man (Ultimate)" as well but a 404 status code
There is .travis.yml That is responsible for running the builds the second line in the script is responsible for running postman collections
You will need Newman installed in your local machine if you will run the collection throw command line or Jenkins locally
-
Postman Used for running api tests and collections
-
Travis CI - Responsible for CI
-
The CI couldn't be run after make the repo private
-
The repository is private if access needed please contact me throw [email protected]
-
Both of the projects are running with one build using the .yml file commands