Skip to content

haite4/cypress-cucumber-task

Repository files navigation

Cypress-Cucumber-Task

Summary

This repository includes 17 automated tests written using the Cypress framework, Cucumber, and JavaScript. These tests validate the functionality of key elements on the Sauce Demo website, including the login, inventory, cart, and checkout pages.

Requirements

Steps to Install

  1. Clone the repository:
    git clone https://github.com/haite4/cypress-cucumber-task
  2. Navigate to the project directory:
    cd cypress-cucumber-task
  3. Install dependencies:
    npm install cypress --save-dev
    npm install 

Steps to Launch

  1. Run all Cypress tests in headless mode:

    npm run cypress:run

    To use a configuration file for mobile testing:

    npm run test:mobile
  2. Run tests with a specific browser:

    • For Chrome:
      npm run test:chrome
    • For Firefox:
      npm run test:firefox
    • For Edge:
      npm run test:edge
  3. Open Cypress Test Runner for interactive testing:

    npm run cypress:open

    This command will open the Cypress Test Runner, allowing you to run and debug tests interactively in the Cypress GUI.

  4. Run tests for specific pages:

    • Login Page Tests:
      npm run test:login:run
    • Inventory Page Tests:
      npm run test:inventory:run
    • Cart Page Tests:
      npm run test:cart:run
    • Checkout Page Tests:
      npm run test:checkout:run

Steps to Launch the Report

  1. Serve the html report:
    npm run cypress:report