mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2026-01-19 03:11:20 +00:00
Merge pull request #3 from IT4Change/add-html-reporting
feat(other): add html reporting
This commit is contained in:
commit
9b588394e9
@ -1,3 +1,4 @@
|
||||
build/
|
||||
cypress/reports/
|
||||
node_modules/
|
||||
cypress/screenshots/
|
||||
node_modules/
|
||||
|
||||
19
.github/workflows/e2e.run.tests.yml
vendored
19
.github/workflows/e2e.run.tests.yml
vendored
@ -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
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
build/
|
||||
cypress/reports/
|
||||
cypress/screenshots/
|
||||
node_modules/
|
||||
.vuepress/.cache
|
||||
.vuepress/.temp
|
||||
|
||||
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/',
|
||||
reportPath: './reports/e2e_html_report',
|
||||
pageTitle: reportTitle,
|
||||
reportName: reportTitle,
|
||||
pageFooter: '<div></div>',
|
||||
hideMetadata: true,
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user