Skip to content

Automated tests of a pseudo eCommerce web application using Cypress and TypeScript.

Notifications You must be signed in to change notification settings

amosnjoroge/buckhill-qa-automation-eng-task

Repository files navigation

Pet-Shop Automated Tests.

This repository contains automated tests of a pseudo eCommerce pet shop web application using Cypress and TypeScript.

Table of Contents

Prerequisites

Before you begin, ensure you have the following:

  • Node.js and npm installed (Node.js >= 12)
  • Git (optional, but recommended)

Installation

  1. Clone this repository:

    git clone https://github.com/amosnjoroge/buckhill-qa-automation-eng-task.git
  2. Navigate to the project folder:

    cd buckhill-qa-automation-eng-task
  3. Install the dependencies:

     npm install

Configuration

The following environment variables are required to run the tests:

💬 Note

These variable have already been configure in the .env file. However, if you wish to change them, you can do so in this file.

Running the tests

Locally

To run all the tests locally in headless mode, run the following command:

npm run cy:run

To run all the tests locally in headed mode, run the following command:

npm run cy:open

This commands will launch the Cypress Test Runner and execute the test suite.

In the CI

The project contains a Github Actions workflow that run the test in the CI. The workflow is triggered by the creation of a pull request. The workflow definition can be found here

💬 Note

In case of a failure the screenshot and videos are uploaded in the CI job's artifacts.

Folder Structure

  • bugs/ - Contains bug reports found during testing
  • cypress/ - Contains Cypress test files
  • integration/ - Test scripts
  • support/ - Custom commands and reusable utilities
  • commands/ - Cypress custom commands; these are reusable functions that can be called from within the test scripts.
  • selectors/ - Contains reusable selectors that can be called from within the test scripts.
  • .env - Environment configuration
  • cypress.config.ts - Cypress configuration
  • tsconfig.json - TypeScript configuration
  • package.json - Project dependencies and scripts
  • README.md - Project documentation (you are here)

Bugs logged during testing

Test Cases automated

About

Automated tests of a pseudo eCommerce web application using Cypress and TypeScript.

Resources

Stars

Watchers

Forks