From f5c54924f8d29394c62c2ffcd1be4caa4c3df4d1 Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Fri, 29 Nov 2024 06:27:31 +0100 Subject: [PATCH] chore: remove reportportal integration + jira --- README.md | 128 ++++++++++++++++-------------------- cypress/support/commands.js | 1 - 2 files changed, 56 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index ba5ad38a..8024f17b 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,76 @@ -## Technology stack -* [Cypress] (https://www.cypress.io/) -* [Allure] (https://docs.qameta.io/): reporting framework +## Technology stack + +- [Cypress] (https://www.cypress.io/) +- [Allure] (https://docs.qameta.io/): reporting framework ## Local execution 1. Check out the relevant branch: - E.g. if you are testing a 2.32.x version of DHIS2 - ```sh - $ git checkout v32 - ``` - or, if you are testing a 2.38.x version of DHIS2 - ```sh - $ git checkout v38 - ``` + E.g. if you are testing a 2.32.x version of DHIS2 + + ```sh + $ git checkout v32 + ``` + + or, if you are testing a 2.38.x version of DHIS2 + + ```sh + $ git checkout v38 + ``` 2. Install dependencies: - ```sh - $ yarn install - ``` + + ```sh + $ yarn install + ``` 3. Set the environment - ```sh - export CYPRESS_LOGIN_USERNAME= - export CYPRESS_LOGIN_PASSWORD= - export CYPRESS_BASE_URL= # e.g. https://prep.dhis2.org/2.38dev/ - ... - - see [Environment variables section](#environment-variables) for more configuration options - ``` + + ```sh + export CYPRESS_LOGIN_USERNAME= + export CYPRESS_LOGIN_PASSWORD= + export CYPRESS_BASE_URL= # e.g. https://prep.dhis2.org/2.38dev/ + ... + + see [Environment variables section](#environment-variables) for more configuration options + ``` 4. Adapt the tests to your environment: - Some of the test feature files include references from the Sierra Leone demo DB. These should be replaced to suit your target DB - Check the following feature files and update the parameters in double-quotes (`"`) accordingly: - ```sh - ./cypress/e2e/capture.cy.js - ``` - + Some of the test feature files include references from the Sierra Leone demo DB. These should be replaced to suit your target DB + Check the following feature files and update the parameters in double-quotes (`"`) accordingly: + ```sh + ./cypress/e2e/capture.cy.js + ``` 5. Run the tests: - ```sh - $ yarn run cy:test - ``` - - or in parallel (using 3 threads): - ```sh - $ yarn run cy:parallel - ``` - - or only smoke tests: - ```sh - $ export TAGS=smoke - $ yarn run cy:test (or any other command) - ``` -## Environment variables + ```sh + $ yarn run cy:test + ``` -| Environment variable | Description | Required | Default value | -|---|---|---|---| -| CYPRESS_BASE_URL | URL of instance under test | true | smoke.dhis2.org/dev_smoke | -| CYPRESS_LOGIN_USERNAME | username of user used in tests | true | admin | -| CYPRESS_LOGIN_PASSWORD | password of user used in tests | true | district | -| RP_TOKEN | token of the report portal user. Only used if running cy:parallel-report | false | N/A | -| CI_BUILD_ID | used as an attribute in RP launches to be able to merge the launches after all tests | false | | -| JIRA_ENABLED | boolean parameter used to control integration with jira reporter | false | N/A | -| JIRA_USERNAME | username of the jira user | if JIRA_ENABLED | N/A | -| JIRA_PASSWORD | password of the jira user | if JIRA_ENABLED | N/A | -| JIRA_RELEASE_VERSION_NAME| version of the release cycle in zephyr | if JIRA_ENABLED | N/A | -| TAGS | filter tests matching specified tags | false | | + or in parallel (using 3 threads): + ```sh + $ yarn run cy:parallel + ``` -## Reporting -### Allure -[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. + or only smoke tests: -### Report portal + ```sh + $ export TAGS=smoke + $ yarn run cy:test (or any other command) + ``` -To enable syncing with report portal, the following environment variables are required: +## Environment variables -| Environment variable | Description | -|--|--| -| RP_TOKEN | Token of report portal user. Can be found in [user profile of report portal](https://test.tools.dhis2.org/reportportal/ui/#user-profile) | -| CI_BUILD_ID | An attribute to add to every launch started by report portal used to merge the launches after test run. | +| Environment variable | Description | Required | Default value | +| ---------------------- | ------------------------------------ | -------- | ------------------------- | +| CYPRESS_BASE_URL | URL of instance under test | true | smoke.dhis2.org/dev_smoke | +| CYPRESS_LOGIN_USERNAME | username of user used in tests | true | admin | +| CYPRESS_LOGIN_PASSWORD | password of user used in tests | true | district | +| TAGS | filter tests matching specified tags | false | | -### JIRA -The following environment variables are required to sync with jira: +## Reporting + +### Allure -| Environment variable | Description | -|--|--| -| JIRA_ENABLED | boolean parameter used to control integration with jira reporter | -| JIRA_USERNAME | username of the jira user | -| JIRA_PASSWORD | password of the jira user | -| JIRA_RELEASE_VERSION_NAME| version of the release cycle in zephyr | \ No newline at end of file +[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. diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 11b9bb3e..9c5bdc6e 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -1,6 +1,5 @@ import "./commands/wait.js"; import "./commands/logs.js"; -//require('@reportportal/agent-js-cypress/lib/commands/reportPortalCommands'); // Cypress throws an exception in dashboard tests when scrolling/using the viewport. // This disables that exception.