Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Ant Build Failing with JUnit Tests

Deleted user Aug 16, 2017

My JUnit Parser task fail with "Failing task since test cases were expected but none were found." message.
I configured JUnit Parser with path ${bamboo.build_home}/log/junit/*.xml
From logs:
Substituting variable: ${bamboo.build_home} with /opt/tools/build/current
simple 17-Aug-2017 00:02:47 Starting task 'Get JUnit results' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit'
simple 17-Aug-2017 00:02:47 Parsing test results under /home/bamboo/bamboo-agent-home/xml-data/build-dir/WEB6-W6IT0-BH...
simple 17-Aug-2017 00:02:47 Failing task since test cases were expected but none were found.
simple 17-Aug-2017 00:02:47 Finished task 'Get JUnit results' with result: Failed

I added script task with command ls /opt/tools/build/current/log/junit/ - i can see TESTS-TestSuites.xml file in /opt/tools/build/current/log/junit/ folder.

Why bamboo try to look tests under /home/bamboo/bamboo-agent-home/xml-data/build-dir/WEB6-W6IT0-BH... folder? It should be /opt/tools/build/current/log/junit/*.xml
How i can see full path for message - /home/bamboo/bamboo-agent-home/xml-data/build-dir/WEB6-W6IT0-BH...?

1 answer

0 votes
Jeyanthan I Atlassian Team Aug 17, 2017

Hi Maxim,

By default, files created before the current build will be analysed. As you want to set test results outside the build directory, you will have to enable "Pick up test results that were created outside of this build" under Advanced options in your JUnit Parser task.

Deleted user Aug 17, 2017

It is enabled. The behavior the same for collect test results inside task or as as additional step. I can't get tests results, but i can see test files by ls command.

Hi Maxim, I just tested and found that you can only enter a relative path and navigate within the build directory and never outside a build directory.

Eg. When you enter test-results/*.xml , it looks for xml files under your build directory /home/bamboo/bamboo-agent-home/xml-data/build-dir/WEB6-W6IT0-BH/test-results 

So, the best approach would be copying the files to the build directory. (I'll work with our documentation team to make this clear in the documentation).

PS. When you check Pick up test results that were created outside of this build, it means that Bamboo will no longer verify the timestamp of the xml file creation time whether it is created after the build was started. (I was wrong in my previous update)

I found it ~1 hour ago. I can configure log folder, so i provided environment variable LOG_DIR=${bamboo.build.working.directory}/log. As result all logs and tests results located in build directory and i can see tests results.

Suggest an answer

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

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

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