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...?
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.