[!mayfail] and [!shouldfail] still make the build fail

40 views
Skip to first unread message

Jacopo Freddi

unread,
Dec 1, 2017, 4:21:13 AM12/1/17
to CATCH
Hi all,

I love using Catch (1.x) and it was a great help so far. I discovered this amazing feature where you can track failing behaviours with [!mayfail] and [!shouldfail] while retaining the test integrity. In command line the behaviour is fine with both tags:

However, when I push to Bamboo the failing test cases make the whole CI build fail:

In my Bamboo build, after checkout I run the tests with JUnit output and collect the resulting XML with a JUnit parser to process them. I checked the generated XML and it seems to me that the "failed as expected" tests in the XML output look the same as regular failures:


    <testcase classname="[Warning] Broken: [Item]: behaviour" name="behaves well" time="0.032112">
      <failure message="!true" type="CHECK_FALSE">
at c:\test\src\automatedtestgeneration.cpp(612)
      </failure>
      <failure message="!true" type="CHECK_FALSE">
at c:\test\src\automatedtestgeneration.cpp(612)
      </failure>
    </testcase> 


Is there a way to keep these failing test cases as "warnings" while allowing the build to continue? I would love to be able to remind myself with each build that those test cases are still not fixed.
Reply all
Reply to author
Forward
0 new messages