mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-13 04:55:50 +00:00
configure html reporting for failing test run
This commit is contained in:
parent
0a9ad44a38
commit
d68e9c3bac
14
.github/workflows/e2e.run.tests.yml
vendored
14
.github/workflows/e2e.run.tests.yml
vendored
@ -11,4 +11,18 @@ jobs:
|
|||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: E2E - Run all tests
|
- name: E2E - Run all tests
|
||||||
|
id: e2e-tests
|
||||||
uses: cypress-io/github-action@v6
|
uses: cypress-io/github-action@v6
|
||||||
|
|
||||||
|
- name: E2E | if tests failed, compile html report
|
||||||
|
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
|
||||||
|
run: |
|
||||||
|
cd cypress/
|
||||||
|
node create-cucumber-html-report.js
|
||||||
|
|
||||||
|
- name: E2E | if tests failed, upload report
|
||||||
|
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: boilerplate-e2e-test-report-pr${{ needs.e2e-tests.outputs.pr-number }}
|
||||||
|
path: /home/runner/work/boilerplate-e2e-cypress-cucumber/boilerplate-e2e-cypress-cucumber/cypress/reports/e2e_html_report
|
||||||
|
|||||||
12
cypress/create-cucumber-html-report.js
Normal file
12
cypress/create-cucumber-html-report.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import report from 'multiple-cucumber-html-reporter'
|
||||||
|
|
||||||
|
const reportTitle = 'DreamMall End-to-End Test Report'
|
||||||
|
|
||||||
|
report.generate({
|
||||||
|
jsonDir: 'reports/json_logs',
|
||||||
|
reportPath: './reports/cucumber_html_report',
|
||||||
|
pageTitle: reportTitle,
|
||||||
|
reportName: reportTitle,
|
||||||
|
pageFooter: '<div></div>',
|
||||||
|
hideMetadata: true,
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user