Sign inSign up

cyancor/cypress-runner

By cyancor

Updated over 3 years ago

cypress.io Runner with Firefox, Chrome and Electron installed. Ready to run in your CI and locally.

Image
1

10K+

cyancor/cypress-runner repository overview

Repository

https://gitlab.com/cyancor/docker-cypress-runner

How to

docker run -t -v /path-to-your-cypress-project:/project -v /path-to-your-www-content:/www cyancor/cypress-runner

To monitor the run you can add -p 6080:6080 and watch the tests in your browser: http://localhost:6080 (if the test runs headless you do not see anything)

Continuous Integration with integrated webserver

Just point the variables PROJECT_PATH to your cypress.io root path and WWW_PATH to your web content. Both paths have to be absolute.

  • /run-cypress.sh to start the cypress runner

To pass custom arguments to cypress just add them to run-cypress.sh

  • /run-cypress.sh [arguments for cypress]

Own webserver

If you are using your own webserver or you want to pass custom arguments to cypress do not start /run-cypress.shinstead do the following:

  • /start-all.sh - This starts your desktop environment with DISPLAY=:1
  • cdto your cypress root directory
  • npx cypress run or npx cypress run [some other arguments]

Select browser

  • /run-cypress.sh --browser firefox
  • /run-cypress.sh --browser chrome
  • /run-cypress.sh --browser electron

Errors and how to fix them

  • Cannot find module '/.../node_modules/cypress/index.js' ... code: 'MODULE_NOT_FOUND'
    • Fix: Run npm install

Tag summary

Content type

Image

Digest

sha256:441b33546

Size

990.6 MB

Last updated

over 3 years ago

docker pull cyancor/cypress-runner