{"id":19004855,"url":"https://github.com/dhis2/e2e-tests","last_synced_at":"2025-04-22T18:50:03.332Z","repository":{"id":40430558,"uuid":"105121894","full_name":"dhis2/e2e-tests","owner":"dhis2","description":"DHIS 2 end to end tests","archived":false,"fork":false,"pushed_at":"2025-04-08T13:14:01.000Z","size":1365,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-17T05:54:24.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/dhis2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-28T08:21:30.000Z","updated_at":"2025-04-14T12:24:24.000Z","dependencies_parsed_at":"2023-09-27T17:19:38.322Z","dependency_job_id":"20b15091-5c83-4ac9-a434-659fa0df7a00","html_url":"https://github.com/dhis2/e2e-tests","commit_stats":null,"previous_names":[],"tags_count":109,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhis2%2Fe2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhis2%2Fe2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhis2%2Fe2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhis2%2Fe2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhis2","download_url":"https://codeload.github.com/dhis2/e2e-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250302739,"owners_count":21408438,"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":[],"created_at":"2024-11-08T18:24:52.955Z","updated_at":"2025-04-22T18:50:03.306Z","avatar_url":"https://github.com/dhis2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Technology stack\n\n- [Cypress] (https://www.cypress.io/)\n- [Allure] (https://docs.qameta.io/): reporting framework\n\n## Local execution\n\n1. Check out the relevant branch:\n   E.g. if you are testing a 2.32.x version of DHIS2\n\n   ```sh\n   $ git checkout v32\n   ```\n\n   or, if you are testing a 2.38.x version of DHIS2\n\n   ```sh\n   $ git checkout v38\n   ```\n\n2. Install dependencies:\n\n   ```sh\n   $ yarn install\n   ```\n\n3. Set the environment\n\n   ```sh\n   export CYPRESS_LOGIN_USERNAME=\u003cdhis2_superuser\u003e\n   export CYPRESS_LOGIN_PASSWORD=\u003cdhis2_superuser_password\u003e\n   export CYPRESS_BASE_URL=\u003cinstance_URL\u003e  # e.g. https://prep.dhis2.org/2.38dev/\n   ...\n\n   see [Environment variables section](#environment-variables) for more configuration options\n   ```\n\n4. Adapt the tests to your environment:\n   Some of the test feature files include references from the Sierra Leone demo DB. These should be replaced to suit your target DB  \n   Check the following feature files and update the parameters in double-quotes (`\"`) accordingly:\n   ```sh\n   ./cypress/e2e/capture.cy.js\n   ```\n5. Run the tests:\n\n   ```sh\n   $ yarn run cy:test\n   ```\n\n   or in parallel (using 3 threads):\n\n   ```sh\n   $ yarn run cy:parallel\n   ```\n\n   or only smoke tests:\n\n   ```sh\n   $ export TAGS=smoke\n   $ yarn run cy:test (or any other command)\n   ```\n\n## Environment variables\n\n| Environment variable   | Description                          | Required | Default value             |\n| ---------------------- | ------------------------------------ | -------- | ------------------------- |\n| CYPRESS_BASE_URL       | URL of instance under test           | true     | smoke.dhis2.org/dev_smoke |\n| CYPRESS_LOGIN_USERNAME | username of user used in tests       | true     | admin                     |\n| CYPRESS_LOGIN_PASSWORD | password of user used in tests       | true     | district                  |\n| TAGS                   | filter tests matching specified tags | false    |                           |\n\n## Reporting\n\n### Allure\n\n[Allure](https://docs.qameta.io/allure/) is the framework used to generate a test report. To generate and serve the report, run `yarn run allure:serve`. The report should open in a browser window.\n\n\n## Notes about specific tests\n\n### Smoke app tests\n\nIt checks the apps load correctly. It gets the list of the apps on _jenkins_ using a script `initDataScript` which sets some environment variables for the tests.\n\nTo get the list of the apps, a call is made to `/dhis-web-apps/apps-bundle.json` then the webname field is used for running the tests.\n\nTo run the tests locally, you can temporarily add this list to `cypress.config.js`. This is how the list would like look like:\n\n\n```\nenv: {\n    LOGIN_USERNAME: \"admin\",\n    LOGIN_PASSWORD: \"district\",\n    allure: \"true\",\n    grepTags: process.env.TAGS,\n    allureResultsPath: \"reports/allure-results\",\n    apps: [\n      \"dhis-web-aggregate-data-entry\",\n      \"dhis-web-approval\",\n      \"dhis-web-app-management\",\n      \"dhis-web-cache-cleaner\",\n      \"dhis-web-capture\",\n      \"dhis-web-dashboard\",\n      \"dhis-web-data-administration\",\n      \"dhis-web-data-visualizer\",\n      \"dhis-web-data-quality\",\n      \"dhis-web-datastore\",\n      \"dhis-web-event-reports\",\n      \"dhis-web-event-visualizer\",\n      \"dhis-web-import-export\",\n      \"dhis-web-interpretation\",\n      \"dhis-web-maintenance\",\n      \"dhis-web-maps\",\n      \"dhis-web-menu-management\",\n      \"dhis-web-messaging\",\n      \"dhis-web-reports\",\n      \"dhis-web-scheduler\",\n      \"dhis-web-sms-configuration\",\n      \"dhis-web-settings\",\n      \"dhis-web-tracker-capture\",\n      \"dhis-web-translations\",\n      \"dhis-web-usage-analytics\",\n      \"dhis-web-user\",\n      \"dhis-web-user-profile\",\n    ],\n  },\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhis2%2Fe2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhis2%2Fe2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhis2%2Fe2e-tests/lists"}