-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for "global logging" to be possible from Cypress events #1949
Comments
Neither of those functions support writing async code, which Can you go into more detail about:
You can write a simple root level Per your other questions: you can use |
@brian-mann where can i find the docs for the root level before? I have not seen the capability yet. Let me try |
@brian-mann trying this code passes the test & then has an indefinite loading graphic on what im trying to do :(
|
@brian-mann ok i understand - you can use This is working for me:
|
Thanks for the help. The only other thing I can see is my afterEach will run even if the test passed. Is there a way for me to get the status of the test too? |
Doc on global hooks in support file: https://on.cypress.io/writing-and-organizing-tests#Support-file |
@egucciar this is a feature as part of I think this is an FAQ question too: @jennifer-shehane / @ValerieThoma if it's not, it should be, possibly a recipe as well. |
@ValerieThoma @jennifer-shehane @brian-mann wil the |
@brian-mann alternatively if you can log out to the standard console during a CLI run, then we can just output the version rather than logging it to the test runner itself. I think integration with Sentry would greatly improve the benefit we get from our awesome cypress test suite, so I hope I can find a solution |
I've added Sentry to the list of integrations we're considering in our integrations issue: #981 |
Neat! For now I'm beforeEaching the version instead and can reference the video for more details. Sentry and other integrations out of the box would be awesome. We personally use Segment to streamline our use of Integration platforms , and are happy with the result , but the ability to view the logs next to the test cases would be super awesome |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen. |
Current behavior:
Cyrrently, attempting to make a
cy.log
call either onBeforeLoad or on fail is not working. I need to output some metadata to test runner on each run so i can reconcile the test run with our Sentry integration in case there is a backend or JS error which is not being captured in the test runner.These codes do not work
Desired behavior:
I would like a clear path to accomplish the above use case without writing a
beforeEach
for every suite in the app.Versions
3.0.1
The text was updated successfully, but these errors were encountered: