Build failed due to failed JUnit tests
Hi,
I have a unit tests specifying defect or functionality to be done in next iteration; it is OK it fails at the time. How to specify a build should succeed although the tests failed? I removed errorProperty and failureProperty; the build still fails. Regards, Roman |
6 answers
The junitLogPublisher task supports a "mayFailPattern" attribute. We move the test classes that may fail in a suite called AllTestsMayFail.java and then include the "AllTestsMayFail" as the pattern when the JUnit results are published for that suite. This will allow tests to fail in that suite and not affect the overall build status.
Don Weinand Jazz Team Build |
Hi,
I have renamed the test suite class to: SmokeAllmayFailPattern.java and the build.xml includes: <junitLogPublisher filePath="${dir.junit}/TEST-com.tietoenator.terup.agile.test.SmokeAllmayFailPattern.xml" buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="***" password="****" mayFailPattern="true"/> However, the build still fails. Did I missed something? Roman "dmweinan" <dmweinan@us.ibm-dot-com.no-spam.invalid> wrote in message news:ft2rse$3cv$1@localhost.localdomain... The junitLogPublisher task supports a "mayFailPattern" |
It seems like your may fail pattern should be "SmokeAllmayFailPattern".
Don Weinand Jazz Team Build |
That is exactly what I have - see my previous post.
Or am I blind to see some simple difference? Roman "dmweinan" <dmweinan@us.ibm-dot-com.no-spam.invalid> wrote in message news:ft5cnv$6ru$1@localhost.localdomain... It seems like your may fail pattern should be |
I see this in your post...
mayFailPattern="true"/> It should contain the pattern that should be ignored. It's the test suite name that the pattern is being compared against not the name of the log file. The JUnitLogPublisherTask can support publishing an entire directory of log files so it will allow any test suite it finds that matches the pattern to fail. The Javadoc for this task that is located in \jazz\buildsystem\buildtoolkit\task-javadoc\index.html explains how this parameter as well as the others are expected to be used. Don Weinand Jazz Team Build |
I see now.
Thanks, Roman "dmweinan" <dmweinan@us.ibm-dot-com.no-spam.invalid> wrote in message news:ftdbja$tom$1@localhost.localdomain... I see this in your post... |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.