Created
August 16, 2020 14:03
-
-
Save timja/e4b001a528302978f5a0224f894fb182 to your computer and use it in GitHub Desktop.
junit-pluggable-pipeline.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node('master') { | |
writeFile file: 'x.xml', text: '''<testsuite name='sweet'><testcase classname='Klazz' name='test1'><error message='failure'/></testcase><testcase classname='Klazz' name='test2'/><testcase classname='other.Klazz' name='test3'><skipped message='Not actually run.'/></testcase></testsuite>''' | |
def s = junit 'x.xml' | |
echo(/summary: fail=$s.failCount skip=$s.skipCount pass=$s.passCount total=$s.totalCount/) | |
writeFile file: 'x.xml', text: '''<testsuite name='supersweet'><testcase classname='another.Klazz' name='test1'><error message='another failure'/></testcase></testsuite>''' | |
s = junit 'x.xml' | |
echo(/next summary: fail=$s.failCount skip=$s.skipCount pass=$s.passCount total=$s.totalCount/) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment