mahula 07815e887f
update e2e-tests/cypress/README.md
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2022-09-29 11:12:06 +02:00
..
2022-07-19 13:05:07 +02:00
2022-09-29 11:12:06 +02:00

Gradido End-to-End Testing with Cypress (CI-ready via Docker)

A setup to show-case Cypress as an end-to-end testing tool for Gradido running in a Docker container. The tests are organized in feature files written in Gherkin syntax.

Features under test

So far these features are initially tested

Precondition

Before running the test, change to the repo's root directory (gradido) and boot up the system under test:

docker-compose up

Execute the test

This setup will be integrated in the Gradido Github Actions to automatically support the CI/CD process. For now the test setup can only be use locally in two modes

Run Cypress directly from the code

# change to the tests directory 
cd /path/to/gradido/e2e-tests/cypress/tests

# install all dependencies
yarn install

# a) run the tests on command line
yarn cypress run

# b) open the Cypress GUI to run the tests in interactive mode
yarn cypress open

Run Cyprss from a separate Docker container

# change to the cypress directory 
cd /path/to/gradido/e2e-tests/cypress/

# build a Docker image from the Dockerfile
docker build -t gradido_e2e-tests-cypress .

# run the Docker image and execute the given tests
docker run -it --network=host gradido_e2e-tests-cypress yarn cypress-e2e