Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Failed NUnit tests show as skipped

I created a NUnit test and it works fine when everything passes, however once a test fails, then that test is shown as Skipped/Quarantined rather than failed. I found this issue which got solved by adding ";format=nunit2" to the result option. In our Bamboo version (7.0.3 build 70016) this gets done automatically already.

How to make Bamboo understand NUnit results?

Test result from log:

build	17-Nov-2020 14:49:39	Test Run Summary
build	17-Nov-2020 14:49:39	  Overall result: Failed
build	17-Nov-2020 14:49:39	  Test Count: 1, Passed: 0, Failed: 1, Warnings: 0, Inconclusive: 0, Skipped: 0
build	17-Nov-2020 14:49:39	    Failed Tests - Failures: 1, Errors: 0, Invalid: 0
build	17-Nov-2020 14:49:39	  Start time: 2020-11-17 13:49:30Z
build	17-Nov-2020 14:49:39	    End time: 2020-11-17 13:49:39Z
build	17-Nov-2020 14:49:39	    Duration: 8.910 seconds
build	17-Nov-2020 14:49:39	
build	17-Nov-2020 14:49:39	Results (nunit2) saved as TestResults.xml
simple	17-Nov-2020 14:49:39	Parsing test results under D:\Bamboo\xml-data\build-dir\TEST-TEST-TESTS...

 

1 answer

1 accepted

0 votes
Answer accepted

I think I fixed it. Needed to add

--result TestResults.xml;format=nunit3

 into the console parameters. It seems the NUnit parser expects nunit3 style, but the runner by default still produced nunit2 style

While this fixed the test showing incorrectly as skipped and it shows correctly as failed, it does not show the error log why it failed.

 

Edit: Turns out it does not show lines written to TextContext.Error. When using the error messages in Assert.Fail() or similar it works

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...

943 views 4 7
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