Is there any way to implement screenshots in combination with Junit for GitLab? #208
-
I was checking out how to use GitLab's support for screenshots as part of Junit reports which requires one to implement roughly the following: <testcase time="1.00" name="Test">
<system-out>[[ATTACHMENT|/path/to/some/file]]</system-out>
</testcase> I saw a post from 2019 in the closed issues and was wondering whether anything had changed from then and it's now possible to implement this. If it's not and contributions are acceptable, maybe you could give some pointers where to start? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Thanks for submitting an issue! If the syntax requires the use of system-out then that raises a few issues:
So the only way I can think to implement this would be to use jest-junit as-is and then have a posttest script that looks for screenshots and modifies junit.xml to include the tags. Or if you wanted jest-junit to do it then we'd either need a property specifically for gitlab which tells it to look for screenshots here, and if one is found, add the tag. Or have some mechanism whereby we can call out to a script users of jest-junit would maintain that would be responsible for making changes to a given testcase object before it's transformed to XML. Hope this helps |
Beta Was this translation helpful? Give feedback.
-
For a while now Jest has not passed along stdout/stderr to reporters from test runs. So a change would need to be made to jest itself so that reporters have this information like we used to. |
Beta Was this translation helpful? Give feedback.
Thanks for submitting an issue!
If the syntax requires the use of system-out then that raises a few issues:
So the only way I can think to implement this would be to use jest-junit as-is and then have a posttest script that looks for screenshots and modifies junit.xml to include the tags.
Or if you wanted jest-junit to do it then we'd either nee…