{"id":14384690,"url":"https://github.com/cypress-io/cypress-example-docker-circle","last_synced_at":"2025-08-23T17:33:23.487Z","repository":{"id":41545372,"uuid":"92512668","full_name":"cypress-io/cypress-example-docker-circle","owner":"cypress-io","description":"Cypress + Docker + CircleCI = ❤️","archived":true,"fork":false,"pushed_at":"2020-06-25T09:33:29.000Z","size":439,"stargazers_count":121,"open_issues_count":9,"forks_count":34,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-29T18:35:38.396Z","etag":null,"topics":["ci","circle","circleci","cypress","docker","example"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cypress-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T13:21:50.000Z","updated_at":"2023-11-22T14:41:46.000Z","dependencies_parsed_at":"2022-09-06T08:01:42.975Z","dependency_job_id":null,"html_url":"https://github.com/cypress-io/cypress-example-docker-circle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypress-io%2Fcypress-example-docker-circle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypress-io%2Fcypress-example-docker-circle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypress-io%2Fcypress-example-docker-circle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypress-io%2Fcypress-example-docker-circle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cypress-io","download_url":"https://codeload.github.com/cypress-io/cypress-example-docker-circle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230716617,"owners_count":18269807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","circle","circleci","cypress","docker","example"],"created_at":"2024-08-28T18:01:35.231Z","updated_at":"2024-12-21T12:30:51.562Z","avatar_url":"https://github.com/cypress-io.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# cypress-example-docker-circle [![CircleCI](https://circleci.com/gh/cypress-io/cypress-example-docker-circle.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-docker-circle)\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/cypress-io/cypress-example-docker-circle.svg)](https://greenkeeper.io/)\n\n\u003e Cypress + Docker + CircleCI = ❤️\n\nRunning your Cypress E2E tests on Circle CI v2.0 is very simple.\nSee [circle.yml](circle.yml) for the current build commands.\nYou can use our base image\n[cypress/base](https://hub.docker.com/r/cypress/base/) with all\ndependencies pre-installed.\n\nThen check out the code and call `cypress run` command. That is it!\nSee test runs for this example at\n[circleci.com](https://circleci.com/gh/cypress-io/cypress-example-docker-circle)\n\n\u003cimg src=\"screenshots/circle.png\" height=\"500\" /\u003e\n\n**Note:** if you want to use CircleCI [Workflows feature][workflows] to run\nmultiple tests in parallel, check out our example repo\n[cypress-example-docker-circle-workflows][workflows-repo].\n\n[workflows]: https://circleci.com/docs/2.0/workflows/\n[workflows-repo]: https://github.com/cypress-io/cypress-example-docker-circle-workflows\n\n## Artifacts\n\nYou can save generated videos and screenshots as CircleCI artifacts\n\n```yaml\nsteps:\n  - checkout\n  - run:\n      name: Running E2E tests\n      command: cypress run\n  - store_artifacts:\n      path: cypress/videos\n  - store_artifacts:\n      path: cypress/screenshots\n```\n\n## Test summary\n\n### Generate just XML report\n\nCircleCI can [store test results](https://circleci.com/docs/2.0/configuration-reference/#store_test_results)\nfrom a large number of [test reporters](https://circleci.com/docs/1.0/test-metadata/#metadata-collection-in-custom-test-steps).\nCypress can [output test results](https://on.cypress.io/reporters)\nwith custom reporters, including using built-in `junit` format.\nJust add the following options to the CI command to generate and store test\nresults.\n\n```yaml\n- run:\n    name: Running E2E tests\n    command: cypress run --reporter junit --reporter-options \"mochaFile=results/my-test-output.xml\"\n- store_test_results:\n    path: results\n```\n\nThe generated file will be placed in folder `results` and the folder will be\nuploaded to CircleCI storage. This summary will be really helpful when a test\nfails. For example, I have introduced a different label into the test, the\nword `testing` never appears on the page, yet the test is looking for it.\n\n```js\n// a-spec.js\nit('has h2', () =\u003e {\n  cy.contains('h2', 'testing')\n})\n```\n\nSee the failed CI test run at\n[https://circleci.com/gh/cypress-io/cypress-example-docker-circle/10](https://circleci.com/gh/cypress-io/cypress-example-docker-circle/10).\n\nThe CircleCI test summary shows failed test and user-friendly message.\n\n![Failed test message](screenshots/failed-test-summary.png)\n\nSwitching to the artifacts tab, we can find the screenshot PNG image taken\nat the failure moment.\n\n![Failed test artifact](screenshots/failed-test-screenshot-artifact.png)\n\nFinally, we can open either the video, or the screenshot artifact\n\n![Failed to find \"testing\" H2 element](screenshots/failed-screenshot.png)\n\nThe failure is now easy to see and fix.\n\nIn this repository take a look at `test-junit` script inside [package.json](package.json)\n\n### Spec + XML reports\n\nYou can generate XML `junit` report and see spec output while CI is running\nusing [mocha-multi-reporters](https://github.com/stanleyhlng/mocha-multi-reporters).\n\n```text\nnpm install --save-dev mocha mocha-multi-reporters mocha-junit-reporter\ncypress run --reporter mocha-multi-reporters --reporter-options configFile=config.json\n```\n\nFile [config.json](config.json) has\n\n```json\n{\n  \"reporterEnabled\": \"spec, mocha-junit-reporter\",\n  \"mochaJunitReporterReporterOptions\": {\n    \"mochaFile\": \"multiple-results/results.xml\"\n  }\n}\n```\n\nThe standard output will have spec names during the test run, and the final result will be\nsaved in JUnit XML format in file `multiple-results/results.xml`.\n\nTake a look at `test-multiple` script inside [package.json](package.json) for example.\n\n## Happy testing\n\nIf you find problems with Cypress and CI, please\n\n- consult the [documentation](https://on.cypress.io)\n- ask in our [Gitter channel](https://gitter.im/cypress-io/cypress)\n- find an existing [issue](https://github.com/cypress-io/cypress/issues)\n  or open a new one\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypress-io%2Fcypress-example-docker-circle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcypress-io%2Fcypress-example-docker-circle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypress-io%2Fcypress-example-docker-circle/lists"}