Skip to content

Thairam/Web-Testing-With-Cypress

Repository files navigation

WEB Testing With Cypress

Node Dependencies DependenciesDev Commit Contributors

Didactic example of how to implement and organize automated Web tests using Cypress.

This repository contains:

Prerequisites

Set the environment variables

To configure the settings, make a copy of the cypress.env.example.json file, naming it cypress.env.json. After that, open and edit the settings as needed. The following environment variables are available:

VARIABLE DESCRIPTION DEFAULT
username User with valid and verified profile on Github. yourgithubusername
password Valid and verified user profile password on Github. yourgithubpassword

Set the environment variables for configuring the MySQL Database

To configure the settings, make a copy of the env.example file, naming it .env. After that, open and edit the settings as needed. The following environment variables are available:

VARIABLE DESCRIPTION DEFAULT
MYSQL_URI_TEST location where the MySQL database is hosted localhost
MYSQL_DB_USER Username to connect to the MySQL database. root
MYSQL_DB_PASS Password to connect to the MySQL database. secret
MYSQL_DB_NAME MySQL Database name. database_name

Observation

The purpose of this repository is just to show a way on how to use Cypress to automate Web tests and how to structure your project in a simple and organized way.

Testing real websites requires knowledge of different testing strategies.

Installation and Execution

1. Install dependencies

$ npm install    

2. Opens the Cypress Test Runner

$ npm run cypress:open

3. Run Cypress tests

$ npm run cypress:run

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine!

Step 2

  • HACK AWAY! 🔨

Step 3

  • 🔃 Create a new pull request!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published