Testes End-to-End usando Cypress and Cucumber with Smell

The purpose of this code is to perform end-to-end tests, in this case 1 test with Smells found in the table below and 8 smells(Organizing Tests, Logging In, Controlling State, Selecting Elements, Assigning Return Values Visiting External Sites, Using after Or afterEach Hooks, Unnecessary Waiting, Web Servers and Setting a Global baseUrl) are documented at https://docs.cypress.io/guides/references/best-practices. In total 28 smells

Cypress Installation

To carry out the script, configure your environment as follows:

Step 1: Install Cypress. The most recommended way is via npm (required node.js). In the project directory, run:

npm install cypress --save-dev

Step 2:

  1. Install Docker Desktop and restart the machine
  2. If you get the error "WSL 2 installation is incomplete", download and install WSL2 Kernel and click Restart

  1. Open the Docker Desktop app

  1. The tutorial should be shown, just skip it and you will have this screen

  1. Open a terminal and access the newly created directory: "C:/mantis"

  2. In the directory there will be the file docker-compose.yml (It is necessary to replace the ip's of the containers with the ip of the Machine)

  3. Run the command > docker-compose.exe up -d

The docker-compose file stay in reposi

  1. After processing, if all goes well, the images will be downloaded and new containers created

  2. To validate the creation and execution of the run the command docker ps -a and the containers will be available and running

  3. The Docker Desktop application will display the active.

Step 3:

Make your first access to Mantis at http://127.0.0.1:8989

After accessing, it will be necessary to configure the database according to the table and values below:

Variable Value
Type of Database MySQL Improved
Hostname (for Database Server) mantis_db_1
Username (for Database) mantisbt
Password (for Database) mantisbt
Database name (for Database) bugtracker
Admin Username (to create Database if required) root
Admin Password (to create Database if required) root

After filling in, click on Login/Continue and wait for processing.

The first access must be done using administrator/root credentials. Reset the password to administrator or another easy-to-remember value.

To access the Mantis database (MariaDB) follow the steps below:

  1. Download and install HeidiSQL software

  2. When opening the Session Manager, fill in the values below:

  1. Open the connection and you can check all tables and records: