Created
July 9, 2013 10:23
-
-
Save jparrill/5956311 to your computer and use it in GitHub Desktop.
SoapUI Test failed detector in groovy for Jenkins
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
pattern = /.*Total TestCases: ([0-9]) \(([0-9]) failed\)*./ | |
matcher = manager.getLogMatcher(pattern) | |
if(matcher?.matches()) { | |
total = matcher.group(1).toInteger() | |
fails = matcher.group(2).toInteger() | |
} | |
manager.listener.logger.println total | |
manager.listener.logger.println fails | |
if(fails > 0) { | |
manager.buildUnstable() | |
if(fails == total) { | |
manager.buildFailure() | |
} | |
} else { | |
manager.buildSuccess() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment