It's all about the answers!

Ask a question

Build status value

Karthik Krishnan (8825118163) | asked Oct 15 '14, 8:16 a.m.
edited Oct 17 '14, 10:37 a.m. by Jennifer Cianchetta-Riordan (2512)
Is it possible to set "Unstable" (or equivalent to RTC terms) when only the "Tests" fail during the builds?

We don't want to set status failed for unit test failure

Is this possible in RTC to set additional status apart from Success or Failure?

One answer

permanent link
Nick Edgar (6.5k711) | answered Oct 15 '14, 9:16 a.m.
Hi Karthik. The build status supports only OK, INFO, WARNING and ERROR values. However, it's possible to have error/failure test results not impact the overall build result when publishing them. e.g. the junitLogPublisher Ant task has a mayFailPattern= attribute, which can be set to the name of a test suite, or substring thereof. If matched, the tests are published as normal but any test error or failure will not impact the overall build result's status.
We use this in our own self-hosting, separating problematic / intermittently failing tests into "MayFail" test suites.

Karthik Krishnan commented Oct 16 '14, 7:07 a.m. | edited Oct 16 '14, 7:13 a.m.

Hi Nick,

Thanks for your feedback. We don't use JUNIT and use processes the unit testing in ANT. Do you think this is possible with ANT tasks?

Unit test is an example. I could also decided that I can show warning for specific targets in ANT

Nick Edgar commented Oct 16 '14, 9:36 a.m.

How do you publish the test results currently? The Ant tasks for the 4 different unit test result formats we support all have the mayFailPattern attribute (but note that it's just a substring check, not actually pattern matching). The tasks are: junitLogPublisher, cppunitLogPublisher, mstestLogPublisher, and nunitLogPublisher.

Karthik Krishnan commented Oct 16 '14, 11:45 a.m. | edited Oct 16 '14, 11:54 a.m.

Right now we don't publish it yet but we wanted to use this. If we were to use junitLogPublisher could you please tell me how I could set these status?

Edit: Saw this

Also is this possible only for Testing? I mean is there a way for me to set this for specific ANT targets?

Nick Edgar commented Oct 16 '14, 2:27 p.m.

For the test results publishing, see the doc on the Ant task and its mayFailPattern parameter:

 If it's still not clear, let me know. Scripting to change the build status is possible, but shouldn't be necessary.

Your answer

Register or to 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.