-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
this.attach in AfterAll hook #1394
Comments
@flywojt Did you find a solution to your problem or do you still require assistance? |
No, it is not currently possible. This is mainly due to the idea that attachments are added to a particular test and we don't have the concept of adding a file to the run as whole. What is the use case that you want to attach it in after all instead of after? |
@kamolins no, I didn't @charlierudolph I am adding log files with request/response from REST API and another file with information about testing env. For now, I am using step at the end of every feature file but this is not a clean solution, as I am attaching these same files many times. |
Are you using a custom reporter or an open source one to generate the report? In our project we are using TS and we have a static class for storing anything related to the "Test Run" itself, so you could implement something along the lines of that |
This would be a great addition as I've ran into the same scenario that @flywojt mentioned where I need to attach some API request result to the report after all test cases have finished. |
The core team discussed this and we agreed the following changes to messages could work:
This way, an attachment made in a global hook could reference the test run rather than a particular step. |
I want to add a log file as an attachment to report after tests execution. I wanted to use AfterAll hook but according to this comment: #1109 (comment)
this is impossible. How can I achieve that? Is this possible to import attach method directly to AfterAll hook?
The text was updated successfully, but these errors were encountered: