• Community
  • Products
  • Bamboo
  • Questions
  • All the tests passed, but bamboo build fails with a statement "No failed tests found, a possible compilation error occurred."

All the tests passed, but bamboo build fails with a statement "No failed tests found, a possible compilation error occurred."

Hi,

I'm suppose to run some jbehave(automated) tests in bamboo. Once the tests run i'll generate some junit compatible xml files so that bamboo could understand the same. All the jbehave tests are ran as part of a script, because i need to run the jbehave tests in a seperate screen. Example script is as follows.

Ex: export DISPLAY=:0 && xvfb-run --server-args="-screen 0, 1024x768x24" mvn clean integration-test -DskipTests -P integration-test -Dtest=*

I have one more junit parser task which points to the generated xml files. So, once the bamboo build runs and even if all the tests pass, i get red build with the message "No failed tests found, a possible compilation error occurred."

Can somone please help me on this regard.

3 answers

1 accepted

Turns out to be a simple fix.

General bamboo behavior is to scan the entire log and see for any failure codes(1). For this specific configuration i had some 6 scripts out of which one of them was to kill the xvfb(frame buffer). For some reason server is not able to kill xvfb and that task was returning a failure code. Because of this, though all the tests passed, bamboo got one of this error codes from previous tasks and build was failing.

Current fix is to remove the task which kills xvfb and the build went green! \o/.

Not an expert in bamboo, but most such errors occur because the script does not exit with 0, so bamboo marks it as failed.

Yep in my case i was not using any maven task ny default. All of my tasks are the "command" script tasks and i execute even teh maven command using the script. I can see couple of stack traces in the log(which are not affecting my tests any way). I guess, bamboo by default will scan the logs(if i'm not using maven tasks) and looks at those stack traces and assume that there is possibel compilation error. I basically want how i can over come this, because bamboo was able to read my test reports and it knows all of my tests are passed.

0 vote

The most likely cause for this problem is that the xml files are not found (or cannot be parsed due to an invalid format). What path are you using to specify xml files location?

Actually, Bamboo is able to find the xml files and generates a good report. Please look at https://ci.openmrs.org/browse/FUNC-APPTEST/latest. You can see that bamboo found and succesfully parsed 26 files( I have only 26 tests in the application) and hence it says 26 tests passed.

Hm... is it possible that there are (apart of those valid 26 .xml files) also other .xml files in the same path? I was wondering if there could be some temporary 27th .xml file with invalid format generated that would trick Bamboo's junit parser to think there is a "compilaction error"...

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,819 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you