Cypress-Real-World-App -- testing using WebDriverIO

Table of Contents

  1. Summary of Repo
  2. Requirements
  3. Steps to Install
  4. Steps to Launch
  5. Create a Report
  6. Docker

Summary of Repo

This repository contains automated tests for Cypress Real World App implemented using WebDriverIO. The website can be found here.

The deployed GitHub Pages allure reports can be found with the following links:

  1. Allure report for tests run in Chrome browser.
  2. Allure report for tests run in Firefox browser.
  3. Allure report for tests run in Microsoft Edge browser.

Requirements

  • Node.js: Make sure you have Node.js installed.
  • Java 8 or higher: Required for working with Allure.
  • Other dependencies: Check the package.json file for additional dependencies.

Steps to Install

  1. Clone This Repository:
git clone https://github.com/kristinap8/cypress-real-world-app-wdio.git
  1. Navigate to the Project Directory:
cd cypress-real-world-app-wdio
  1. Install Project Dependencies:
npm install

Steps to Launch:

  1. Run All Tests in Chrome:
npm run wdio:run:chrome
  1. Run Single Test in Chrome:
npm run wdio:spec:chrome <path-to-the-spec>
  1. Run All Tests in Firefox:
npm run wdio:run:firefox
  1. Run Single Test in Firefox:
npm run wdio:spec:firefox <path-to-the-spec>
  1. Run All Tests in Microsoft Edge:
npm run wdio:run:edge
  1. Run Single Test in Microsoft Edge:
npm run wdio:spec:edge <path-to-the-spec>

Create a report

  1. Create an Allure Report for Tests Run in Chrome Browser:
npm run report:generate:chrome
  1. Create an Allure Report for Tests Run in Firefox Browser:
npm run report:generate:firefox
  1. Create an Allure Report for Tests Run in Microsoft Edge browser:
npm run report:generate:edge
  1. Open Allure Report for Different Browsers:
npm run report:open:<name-of-a-browser>
  1. Run All Tests for Different Browsers, Generate and Open Allure Report:
npm run wdio:e2e:run:<name-of-a-browser>

Docker

This project provides the ability to run automated tests and generate Allure reports using Docker (implemented for Chrome browser).

  1. Build docker images:
docker-compose build
  1. Run the Cypress Real World App on localhost:3000 in the background:
docker-compose up -d run-app
  1. Execute the following command to run the automated tests:
docker-compose up run-tests 
  1. To generate the Allure report, use the following command:
docker-compose up -d allure

The Allure report will be available at http://localhost:5050/allure-docker-service/projects/default/reports/latest/index.html.

  1. To stop the running Docker containers:
docker-compose down