{"id":40569226,"url":"https://github.com/dgerike/more-cars-e2e-tests","last_synced_at":"2026-01-21T01:33:32.351Z","repository":{"id":40576892,"uuid":"407479411","full_name":"dgerike/more-cars-e2e-tests","owner":"dgerike","description":"This project is meant for educational purposes. Use it to get an idea how Gherkin scenarios work, how they can be hooked up with Cypress, and how to run them in GitHub as a (parallelized) CI job.","archived":false,"fork":false,"pushed_at":"2025-07-11T09:43:33.000Z","size":716,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T12:41:59.647Z","etag":null,"topics":["cypress","e2e","gherkin","parallelization","test-automation","testing"],"latest_commit_sha":null,"homepage":"","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgerike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-17T09:18:11.000Z","updated_at":"2025-07-11T09:43:37.000Z","dependencies_parsed_at":"2024-05-23T09:43:04.908Z","dependency_job_id":null,"html_url":"https://github.com/dgerike/more-cars-e2e-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dgerike/more-cars-e2e-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgerike%2Fmore-cars-e2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgerike%2Fmore-cars-e2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgerike%2Fmore-cars-e2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgerike%2Fmore-cars-e2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgerike","download_url":"https://codeload.github.com/dgerike/more-cars-e2e-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgerike%2Fmore-cars-e2e-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28621704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"ssl_error","status_checked_at":"2026-01-20T23:47:29.996Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cypress","e2e","gherkin","parallelization","test-automation","testing"],"created_at":"2026-01-21T01:33:31.713Z","updated_at":"2026-01-21T01:33:32.338Z","avatar_url":"https://github.com/dgerike.png","language":"Gherkin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# More Cars - e2e Test Suite\n[![Pipeline](https://github.com/dgerike/more-cars-e2e-tests/actions/workflows/pipeline.yaml/badge.svg?branch=main)](https://github.com/dgerike/more-cars-e2e-tests/actions/workflows/pipeline.yaml)\n[![Cypress Tests](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/zoms1v/main\u0026style=flat\u0026logo=cypress)](https://cloud.cypress.io/projects/zoms1v/runs)\n\nThis repo contains the end2end tests for [More Cars](https://more-cars.net). \nThey are written as [Gherkin](https://cucumber.io/docs/gherkin/reference/) scenarios \nand executed in [Cypress](https://www.cypress.io/).\n\nThis project is meant for educational purposes.\nUse it to get an idea how Gherkin scenarios work, \nhow they are hooked up with Cypress, \nand how they can be run in GitHub as a (parallelized) CI job.  \n\n## Installation\n1. Install Node.js: https://nodejs.org/en/\n2. Clone the repo: https://github.com/dgerike/more-cars-e2e-tests \n3. Open the console\n4. Navigate to the path of the cloned repo\n5. Run `npm install`\n6. Run `npx cypress verify` to check if Cypress has been installed correctly\n\n## Running tests\nCypress can be started in two modes: `open` mode and `run` mode. \nThe first one opens a GUI and is used when developing the tests.\nThe other mode is for executing the test suite.\n\n### Running tests in the GUI\n1. Open a console and navigate to the path of the cloned repo\n2. Run `npx cypress open`\n3. A window with a welcome screen should open \n4. Select \"E2E Testing\"\n5. Select one of the available browsers and click \"Start E2E Testing in ...\"\n6. Click on any of the tests to run it\n7. Use the search field to filter tests\n8. Use the browser toggle to switch browsers on the fly\n\n### Running tests on the command line\n1. Open a console and navigate to the path of the cloned repo\n2. Run `npm test` or `npx cypress run`\n3. The whole test suite should be executed in headless mode (meaning, without the browser popping up)\n4. At the end a table with the test results should be shown\n5. Use the parameter `spec` to only run a subset of tests, e.g. `npx cypress run --spec \"cypress/integration/e2e/Done/*\"` to only run all tests that are completely implemented\n6. See https://docs.cypress.io/guides/guides/command-line#cypress-run for more options\n\n## Test Synchronization\n\n### Test Scenarios Download\n\nThe test scenarios are located in the folder `cypress/integration/e2e`, \nbut their management happens in a different tool.\nThe scenarios have identifiers in their filenames (e.g. `E2E-29`), \nbecause they are represented as issues in the project management tool _Jira_ (with _Xray_ extension).\n\nTo download these scenarios there is a script called `scripts/download-gherkin-scenarios.sh`.\nIt requires the `XRAY_API_CLIENT_ID` and the `XRAY_API_CLIENT_SECRET` to be set as environment variables before starting the script.\nSee https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys on how to obtain these credentials.\n```\nexport XRAY_API_CLIENT_ID=...\nexport XRAY_API_CLIENT_SECRET=...\n\nnpm run download-scenarios\n```\n\n### Test Reports\n\nWhen running the test scenarios there are multiple ways to generate test reports.\n\n#### Console\n\nThe easiest way is the command line. \nAs described above, running the command `npm test` will execute every scenario in the test suite.\nFor each test there will be a small report printed to the console. \nAt the end a summary will be shown, with information on how long each test took, how many failed, and so on.\n\nThere is no configuration required.\n\n#### JUnit XML\n\nA common format for test reports is `JUnit XML`. \nIt is supported by many tools and is often used in CI pipelines to have a standardized reporting across all jobs.\n\nCypress supports this format out of the box.\nIt can be configured in the `cypress.config.js` with the following snippet:\n```\n  reporterOptions: {\n    mochaFile: \"cypress/reports/xml/test-results-[hash].xml\",\n  }\n```\n\nSee https://docs.cypress.io/guides/tooling/reporters for more information.\n\n#### Cucumber JSON\n\nAll tests in this project are written as `Gherkin` scenarios.\nBut `JUnit XML` is not very good at creating reports for this kind of tests.\nTo be able to create detailed Gherkin test reports we have to switch to `Cucumber JSON`. \n\nCypress doesn't support this format out of the box, but the plugin `cypress-cucumber-preprocessor` does.\nWe already use it to transform the Gherkin scenarios to a format that Cypress can understand.\nIt can be configured in the `package.json` with the following snippet:\n```\n  \"cypress-cucumber-preprocessor\": {\n    \"json\": {\n      \"enabled\": true,\n      \"output\": \"cypress/reports/json/test-results.json\"\n    }\n  }\n```\n\nSee https://www.npmjs.com/package/cypress-cucumber-preprocessor#output for more information.\n\n#### Cypress Dashboard\n\nThe \"Cypress Dashboard\" is a (paid) service by the company that created Cypress.\nIt allows to upload test results and provides good tools to analyze them afterward. \n\nTo activate the uploading to the Cypress Dashboard the following information needs to be provided:\n* the `projectId` in the `cypress.config.js`\n* the record key as environment variable: `export CYPRESS_RECORD_KEY=...`\n* the `--record` flag in the cli command: `npx cypress run --record`\n\nSee https://docs.cypress.io/guides/dashboard/projects for more information.\n\nThe results for this project can be seen here: https://dashboard.cypress.io/projects/zoms1v/runs\n\n#### Xray/Jira\n\nAnother way to visualize the test results is the test management tool `Xray`.\nIt is a (paid) plugin for the project management tool `Jira`.\nIt allows to write, manage and execute tests.\nIt integrates very well with Jira and is capable of creating comprehensive test reports.\n\nThe Xray API offers multiple options to upload test results into their system, see https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2.  \nIn this project we use the option `Cucumber JSON results Multipart`.\nThe code is wrapped in the script `upload-test-results-to-xray.sh`.\n\nIt requires the `XRAY_API_CLIENT_ID` and the `XRAY_API_CLIENT_SECRET` to be set as environment variables before starting the script.\nSee https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys on how to obtain these credentials.\n```\nexport XRAY_API_CLIENT_ID=...\nexport XRAY_API_CLIENT_SECRET=...\n\nnpm run upload-test-results\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgerike%2Fmore-cars-e2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgerike%2Fmore-cars-e2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgerike%2Fmore-cars-e2e-tests/lists"}