Merge pull request #3 from IT4Change/add-html-reporting

feat(other): add html reporting
This commit is contained in:
mahula 2024-02-24 08:38:14 +01:00 committed by GitHub
commit 9b588394e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,4 @@
build/
cypress/reports/
node_modules/
cypress/screenshots/
node_modules/

View File

@ -11,4 +11,23 @@ jobs:
uses: actions/checkout@master
- name: E2E - Run all tests
id: e2e-run
uses: cypress-io/github-action@v6
- name: E2E | if tests failed, compile html report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
run: |
cd cypress/
node create-cucumber-html-report.js
- name: Get PR number
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: jwalton/gh-find-current-pr@master
id: pr-number
- name: E2E | if tests failed, upload report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: boilerplate-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
path: /home/runner/work/boilerplate-e2e-cypress-cucumber/boilerplate-e2e-cypress-cucumber/cypress/reports/e2e_html_report

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
build/
cypress/reports/
cypress/screenshots/
node_modules/
.vuepress/.cache
.vuepress/.temp

View 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/',
reportPath: './reports/e2e_html_report',
pageTitle: reportTitle,
reportName: reportTitle,
pageFooter: '<div></div>',
hideMetadata: true,
})