fix report generation in e2e test flow

This commit is contained in:
mahula 2023-07-05 18:04:24 +02:00
parent dbc401c855
commit 9a38a8dc43
3 changed files with 10 additions and 6 deletions

View File

@ -33,7 +33,6 @@ jobs:
yarn && yarn dev_reset
cd ../backend
yarn && yarn seed
cd ..
- name: Boot up test system | docker-compose frontends
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps frontend admin nginx
@ -54,11 +53,14 @@ jobs:
- name: End-to-end tests | run tests
id: e2e-tests
run: pwd && yarn run cypress run
run: |
cd e2e-tests/
yarn run cypress run
node create-cucumber-html-report.js
- name: End-to-end tests | if tests failed, upload report
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v3
with:
name: cypress-report-PR-${{ github.event.number }}
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/reports/
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/reports/cucumber_html_report

View File

@ -1,7 +1,9 @@
const report = require("multiple-cucumber-html-reporter");
report.generate({
jsonDir: "cypress/json_logs",
jsonDir: "cypress/reports/json_logs",
reportPath: "./cypress/reports/cucumber_html_report",
pageTitle: "Gradido webapp end-to-end test report",
metadata: {
app: {
name: "Gradido webapp"

View File

@ -11,12 +11,12 @@
"stepDefinitions": "cypress/support/step_definitions/*.ts",
"json": {
"enabled": true,
"output": "cypress/json_logs/cucumber_log.json",
"output": "cypress/reports/json_logs/cucumber_log.json",
"formatter": "cucumber-json-formatter"
},
"messages": {
"enabled": true,
"output": "cypress/json_logs/messages.ndjson"
"output": "cypress/reports/json_logs/messages.ndjson"
},
"html": {
"enabled": false