test [M3-9256]: display cypress test results in html report#11795
Merged
dmcintyr-akamai merged 45 commits intolinode:developfrom Mar 31, 2025
Merged
test [M3-9256]: display cypress test results in html report#11795dmcintyr-akamai merged 45 commits intolinode:developfrom
dmcintyr-akamai merged 45 commits intolinode:developfrom
Conversation
|
Coverage Report: ✅ |
mjac0bs
approved these changes
Mar 20, 2025
Contributor
mjac0bs
left a comment
There was a problem hiding this comment.
Thanks for doing this @dmcintyr-akamai. Will let Joe comment on anything specific to the Cypress set up.
Confirmed the HTML report was output in the specified spot when I ran:
pnpm cy:e2e -s "cypress/e2e/core/kubernetes/lke-create.spec.ts"
| ✅ | Purposely triggered a failure to see what it'd look like |
|---|---|
![]() |
![]() |
I'm not sure that cy:e2e as the command is the most intuitive name to know that it generates the HTML report. Some brief documentation of this in our developer docs End-to-End tests section may help?
…akamai/manager into M3-9256_cypress-html-reporting
Contributor
Author
|
reverting back to draft so i can insert code for demo |
jdamore-linode
approved these changes
Mar 27, 2025
Contributor
jdamore-linode
left a comment
There was a problem hiding this comment.
Nicely done David! I know this is still in draft, happy to take a look if you make any other changes but this looks great
…akamai/manager into M3-9256_cypress-html-reporting
Collaborator
Cloud Manager UI test results🔺 1 failing test on test run #52 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/account/account-logout.spec.ts" |
|||||||||||||||||
This was referenced Apr 3, 2025
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description 📝
Display the cypress test results in an html document. Added cypress-mochawesome-reporter plugin to enable this. The report looks nice and organized:

This task uncovered an existing, known issue w/ cypress where cypress does not allow multiple plugins to listen for the "before:run" and "after:run" hooks, the last plugin to register for the listeners wins. So i added another package as a workaround (cypress-on-fix) which allows an array of listeners for the same event.
Additionally, cypress has a limitation where only a single reporter is allowed, so i used the 'cypress-multi-reporters' package as a workaround to enable multiple reporters. If I don't add this package, then the html reporter would replace the junit reporter.
Adding the additional reporter involved touching the "component" report as well, so it was easier to refactor this. I also removed the configure-test-suite.ts plugin bc it was no longer being used.
Changes 🔄
When running the "cypress:e2e" command, it creates an html report that displays the test results. This content is not added to source control.
Reproduction steps
The junit reporter requires the CY_TEST_JUNIT_REPORT environmental variable to set set to a truthy value:
CY_TEST_JUNIT_REPORT='1'
The html reporter requires the CY_TEST_HTML_REPORT environmental variable to set set to a truthy value:
CY_TEST_HTML_REPORT='1'
For the html report to be enabled in the Jenkins CI pipeline, the CY_TEST_HTML_REPORT will need to be set in the jenkins-ui-library repo (in vars/testManager.groovy and perhaps other groovy files).
To run the e2e report:
pnpm run cy:e2e
To run the component report:
pnpm run cy:component:run
Both commands will result in the html report being created at packages/manager/cypress/reports/html/index.html. The junit report will be at packages/manager/cypress/results/test-results-.xml.
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅