Log each request and response mocked #27895
Unanswered
bluepioupiou
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there.
We've set cypress at a pretty advance usage : everything is mocked, we generate fixtures for each test, screenshots are taken and used to generate a test report for testers.
But I'd like to add some missing information into our test report : what the application really sent and got from the mock server.
Do you know if I can add some options in cy.intercept, or by any other way, to write the request (url, params, body, etc) and reponse (body) in a file each time my app request get intercepted ?
Ideally I would like to do this mechanism one time and not for each intercept..
It seems that cypress will pick only one intercept and I can't do intercept('*') to log and intercept('url') to mock correctly
I tried cy.writeFile inside intercept but cypress fail in error and doesn't wnat to do that
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions