Added support for 'JUnit Attachments Plugin'

Change-Id: Ia311d5ac9e42fba38962e007c37710f34b3e38e8
This commit is contained in:
Kyrylo Shatskyy 2017-02-02 22:44:26 +01:00
parent 03f3b11641
commit 86a3615fd4
3 changed files with 9 additions and 0 deletions

View File

@ -1140,6 +1140,10 @@ def junit(registry, xml_parent, data):
:arg bool flaky-test-reports: Publish flaky test reports (default false).
Requires the Jenkins :jenkins-wiki:`Flaky Test Handler Plugin
<Flaky+Test+Handler+Plugin>`.
:arg bool junit-attachments: Publish test attachments (default false).
Requires the Jenkins :jenkins-wiki:`JUnit Attachments Plugin
<JUnit+Attachments+Plugin>`.
Minimal example using defaults:
@ -1178,6 +1182,9 @@ def junit(registry, xml_parent, data):
XML.SubElement(datapublisher,
'com.google.jenkins.flakyTestHandler.plugin'
'.JUnitFlakyTestDataPublisher')
if str(data.get('junit-attachments', False)).lower() == 'true':
XML.SubElement(datapublisher,
'hudson.plugins.junitattachments.AttachmentPublisher')
def cucumber_reports(registry, xml_parent, data):

View File

@ -11,6 +11,7 @@
<hudson.plugins.claim.ClaimTestDataPublisher/>
<hudson.plugins.measurement__plots.TestDataPublisher/>
<com.google.jenkins.flakyTestHandler.plugin.JUnitFlakyTestDataPublisher/>
<hudson.plugins.junitattachments.AttachmentPublisher/>
</testDataPublishers>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>

View File

@ -9,3 +9,4 @@ publishers:
measurement-plots: true
flaky-test-reports: true
allow-empty-results: true
junit-attachments: true