https://cypress.io logo
Log/access error message on test retry to pipeline...
# i-need-help
e
Currently: an error message will be displayed in stdout if my test fails on the last retry attempt, the error message will only provide details to the last retry attempt and the reason for its failure (not the previous attempts). What I want: If the test fails on the first attempt I want to know why, even if it passes on the next attempt. I want the the information as to why the first attempt failed to be logged to my stdout console window.
I have tried listening to the "fail" event, although have not made strong progress.
Where is the error message pertaining to a test failure stored or logged to? How do I access this error message and send it to my desired location?
RESOLVED - Using a event listener: cy.on("fail") to store error.name & error.message as aliases and then send them to node console using cy.task()