I have a typescript project running a server, and browser tests (using wdio) against the server.
I know about the current practice of storing screenshots as artifacts, which is pretty useful.
The improvement that I propose is on the ‘Test’ tab, to show attachments.
In Junit report format there are multiple practices: GitHub - testmoapp/junitxml: JUnit XML file format & JUnit XML examples. Including format specification, description & conventions.
Attachment url properties:
<testcase name="testCase3" classname="Tests.Registration" time="3.441">
<properties>
<property name="attachment1" value="data:image/png;filename=dot.png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAATXL0Y4OHwAAAABJRU5ErkJggg==" />
<property name="attachment2" value="data:text/html;base64,SGVsbG8sIFdvcmxkIQ==" />
</properties>
</testcase>
Attachments in test output
<testcase name="testCase3" classname="Tests.Registration" time="3.441">
<system-out>
Output line #1
Output line #2
[[ATTACHMENT|screenshots/dashboard.png]]
[[ATTACHMENT|screenshots/users.png]]
</system-out>
</testcase>
For now I would propose to just follow the attachment url properties option and render it in an <img> tag:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB2oAAAQaCAIAAAANFW+RAAAAAXNSR0IAr ..."/>
