Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
junit-pluggable-pipeline.groovy
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