Giter Club home page Giter Club logo

automate_cypress_postman's Introduction

Cypress Automation

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

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

  1. Download the repo

  2. Import the the project in Visual studio code or any

  3. Make sure to install node and cypress from the terminal

  4. for windows run "npx Cypress run"

  5. Check for detailed steps here

  6. Cypress Test Runner will open with all specs that created

  7. Press run all

Prerequisites

  1. Visual studio code
  2. Node Js
  3. Cypress
  4. Travis for CI

pros and cons

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

Test Cases in the code

  1. 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

  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

  1. Checkout validations

3.1 Check that login form appear

3.2 Check that Create account button appear

CI

There is .travis.yml That is responsible for running the builds the first line in the script is responsible for running cypress scripts

Note

Some times in cypress you will need to rerun to get actual results

Built With

This is my CI runs

==================================================================================================================================================================================

MarvelApi

This is a postman project make validation checks on Some Marvel Api's.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

  1. Download the repo

  2. In this path Automate_Cypress_Postman/tests please find the attached collections

  3. Make sure to import Trivago.postman_collection.json to your postman collection

  4. Make sure to import Trivago.Variables.postman_environment.json in the environment variables

Prerequisites

  1. Postman

Running the tests

  1. Open postman

  2. Import Trivago.postman_collection.json to your postman collection

  3. Import Trivago.Variables.postman_environment.json in the environment variables

  4. Change the data that you want to configure like the (time stamp , apikey ...) from the environment variables

  5. Create new runner in postman from this collection

  6. Make sure that all the requests are selected

  7. Configure your runner settings (number of iterations, environment , delay,...)

  8. Press Run

Test Cases in the code

  1. Test for all authorization error codes listed here with their correct error message for series api

  2. 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

  3. 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

  4. Verify that calling invalid endpoint should NOT return "Spider-Man (Ultimate)" as well but a 404 status code

CI

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

Built With

  • Postman Used for running api tests and collections

  • Travis CI - Responsible for CI

  • The CI couldn't be run after make the repo private

Access on Repository

  • 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

automate_cypress_postman's People

Contributors

borhan10 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.