It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to specify JUnit Parser that particular test is expected to be failed.

I need to be sure that all test cases are passed and don't have false positive. So I would like to add the always failing test and in JUnit Parser I would like to specify that this test cases will alway failed, otherwise I can not rely on another test cases.

1 answer

Hi Mykola,

There are a couple of ways you could approach this. It depends on why the test case is failing and whether it causes your build task to fail (ie the process returns non zero exit code)

Some options:

Quarantine the test - This enables bamboo build to pass, assuming your build completes without error. This must be enabled globally in bamboo settings.

Add @Ignore annotation to your code This is useful if the test is causing the build to fail itself (ie not as a result of the bamboo test parsing, but in the actual build task)

In both cases these tests will appear under skipped / ignored tests section in bamboo test results tab.

Screen Shot 2020-09-18 at 8.32.50 AM.png

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

394 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you