How to attach HAR log generated by Cypress to the report? #2631
-
I'm using cypress-har-generator to record the HAR log for each test. My e2e.js: beforeEach(() => {
cy.recordHar()
})
afterEach(function () {
const contextValue = Cypress.currentTest.titlePath[0]
const describeValue = Cypress.currentTest.titlePath[1]
const itValue = Cypress.currentTest.titlePath[2]
const fileName = `${contextValue} | ${describeValue} | ${itValue}`
if (this.currentTest.state === 'passed') {
cy.disposeOfHar()
}
if (this.currentTest.state === 'failed') {
cy.saveHar({ fileName })
}
}) I'd like to attach it to the report but I don't understand how to make it. |
Beta Was this translation helpful? Give feedback.
Answered by
yarniko
Jul 9, 2024
Replies: 1 comment
-
As I understand it's impossible:
I have to add it manually to each test... |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yarniko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I understand it's impossible:
I have to add it manually to each test...