Skip to content

PecodeAutomation/swag_labs_cypress_example

Repository files navigation

This repository contains an automated test suite built with Cypress for testing Swag labs site.

Installation

Prerequisite: Install Node.js (only once)

1. Clone the repository:

git clone [repository-url]

2. Navigate to the project directory:

cd [project-folder]

3. Install dependencies

npm install

4.Configure Credentials & Environment

Create a cypress.env.json file in the root folder with the following structure:

{
  "standardUserName": "",
  "lockedUserName": "",
  "problemUserName": "",
  "performanceGlitchUserName": "",
  "errorUserName": "",
  "visualUserName": "",
  "password": "",
  "invalid_password": "",
  "invalid_username": "",
  "dev": {
    "url": "",
    "base_page": ""
  }
}

5. Run the tests

npm run test:chrome

Note: Passing :headless will force the browser to be hidden. To see more flags to run automation with, check the official Cypress CLI documentation.

6. Open the Cypress test editor

npm run test:debug

Configuration

Configuration options can be set in:

  • cypress.config.js - Main configuration file
  • cypress.env.json - Environment variables (create from point 4)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published