Support `[[ATTACHMENT|path/to/file]]`?
See original GitHub issuePlease support the Attachment
pattern:
<system-out>
....
[[ATTACHMENT|/absolute/path/to/some/file]]
....
</system-out>
(see Jenkins or MSDN Forums)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Service Desk createAttachment API? - SolarWinds THWACK
We have an important requirement to include attachment during creating new incident using Service Desk REST APIs. I was able to execute createIncident...
Read more >Using HTTP POST action with Samanage API
I am trying to attach a file to an incident in Samange using the generic HTTP action. Samanage's API documentation to do this...
Read more >Unable to create a ticket with attachment New-JiraIssue #336
I'm trying to create a new JIRA issue with a required field of attachment. No matter how I format it I've been unable...
Read more >WireMail::attachment() method - ProcessWire API
Multiple calls will append attachments. To remove the supplied attachments, specify NULL as the value. Attachments may or may not be supported by...
Read more >SolarWinds ITSM API - Service Desk
SolarWinds Service Desk API (0.2.2) · General Concepts · Incident · Problem · Change · Change Catalog · Change Request · Release.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The simplest way is to make
href
orsrc
of a link in report be exactly equal toATTACHMENT
value (URLencoded, though). And that attachment value could be relative path to report file. Relative path works well for both local path and Web scenario. It is thejunit2html
user’s duty to make the attachment available for the web server on that path.So, that algorithm is such:
[test author]
writes a file to the path relative to the XML report. E.g.logs/test-11111.log
andshots/shot-01.png
.[test author]
writes[[ATTACHMENT|logs/test-11111.log]]
to the test’s stdout. Now we have it in our report.[junit2html user]
callsjunit2html
to make HTML report from XML.[junit2html]
sees[[ATTACHMENT|.....]]
and checks file’s MIME type.image/*
the<img src=
is used.video/*
the<video src=
is used.<a href=
is used.[junit2html user]
copies converted HTML report and all the files around it (withlogs/test-11111.log
included) to some location served by HTTP server, like/www/reports/my-great-product/unique-test-id
.[HTTP server]
serves HTML report from (lets say)https://reports.local
https://reports.local/my-great-product/unique-test-id/report.html
(or even index.html, but that is easily achieved outside ofjunit2html
)<img src="shots/shot-01.png">
and<a href="logs/test-11111.log"/>logs/test-11111.log</a>
in the report. They still works cause they’re relative to the report’s file.Other scenarios could be achieved by the
[test author]
as (s)he knows how the report server works and change[[ATTACHMENT|....]]
text accordingly.Hi @BenjaminLaschkar This seems to be a feature of a jenkins plugin rather than part of the junit spec.
I don’t think I will include this into junit2html.