How to run cypress locally inside a local Docker?
See original GitHub issueMy Error:
cypress_1 | Cypress could not verify that this server is running:
cypress_1 |
cypress_1 | > http://localhost:3000
cypress_1 |
cypress_1 | We are verifying this server because it has been configured as your `baseUrl`.
cypress_1 |
cypress_1 | Cypress automatically waits until your server is accessible before running tests.
My docker-compose
# run Cypress tests and exit with command
# docker-compose up --exit-code-from cypress
services:
cypress:
# the Docker image to use from https://github.com/cypress-io/cypress-docker-images
image: "cypress/included:5.0.0"
environment:
- CYPRESS_baseUrl=http://localhost:3000
# share the current folder as volume to avoid copying
working_dir: /e2e
command: "--browser chrome"
ports:
- 3333:3000
volumes:
- ./:/e2e
My config
"baseUrl": "http://localhost:3000",
"integrationFolder": "cypress/integration",
"fileServerFolder": "dist",
"viewportWidth": 1200,
"viewportHeight": 1000,
"chromeWebSecurity": true,
"projectId": "3orb3g",
"retries": {
"runMode": 1,
"openMode": 3
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Run Cypress with a single Docker command
Running headless tests ... Then you can execute your Cypress tests using the following shell command: $ docker run -it -v $PWD:/e2e -w...
Read more >How to run cypress locally inside a local Docker? #733 - GitHub
run Cypress tests and exit with command # docker-compose up --exit-code-from cypress services: cypress: # the Docker image to use from ...
Read more >Running Cypress Tests in Docker (Part 9) - Medium
You create your image once and run it anywhere on your local, inside ci/cd, or any other setups; With Cypress, you can use...
Read more >Integrate Cypress with Docker in 5 minutes - Giridhar Rajkumar
Benefits of running Cypress tests in Docker · Cross-browser testing made simple and elegant · No additional / complex configurations required · No ......
Read more >Executing Cypress scripts inside Docker Container - LinkedIn
Now that we have tried to execute the project locally and tested everything, we can further extend cypress tests to run inside a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The config in your base URL is different. It will also be helpful to provide a runnable reproduction.
No 😢