Skip to content

ziyaaktas/cypress-open-from-docker-compose

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cypress-open-from-docker-compose

Forked from mtlynch/hello-world-cypress that allows to run a project and its Cypress end-to-end tests using docker-compose. The initial setup is well described in "End-to-End Testing Web Apps: The Painless Way.".

Also read "Run Cypress with a single Docker command".

Run headless tests

e2e/docker-compose.yml has all settings to start the web application and run Cypress end-to-end tests from e2e/cypress/integration

cd e2e
docker-compose up --exit-code-from cypress

Run Test Runner

To start Cypress Test Runner (just like cypress open does), you need to:

  • set up X11 server on the host machine, for example using XQuartz following the Running GUI applications using Docker for Mac
  • set the IP variable and allow X11 server to accept incoming connections from that network address, see e2e/cy-open.yml for commands
  • set the DISPLAY variable and pass it to the docker-compose when running with both configuration files
cd e2e
docker-compose -f docker-compose.yml -f cy-open.yml up --exit-code-from cypress

You should see Cypress open and be able to run tests, change files, see tests rerun.

Cypress open

More information

About

A simple example of using Cypress.io for end-to-end testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 81.7%
  • JavaScript 14.9%
  • Dockerfile 3.4%