I want to integrate junit test execution with results in my CI bamboo pipeline . what would be command for maven ? how do i proceed? what will be the tasks ?
Thank you for your reply .. I have gone through the document . I am getting error like this :
simple 08-Jul-2021 15:26:39 Starting task 'Junit Test' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit'
simple 08-Jul-2021 15:26:39 Parsing test results under /home/bamboo/bamboo-agent-home/xml-data/build-dir/ELLIPSE-ER-JOB1...
simple 08-Jul-2021 15:26:39 Failing task since test cases were expected but none were found.
simple 08-Jul-2021 15:26:39 Finished task 'Junit Test' with result: Failed
Hi @[deleted] ,
There are two things you need to do:
1. run the correct command to run the tests as part of your build
2. configure and run the junit parser to locate the test results
First you need to ensure your tests are running in the build and that you know where the resulting test results files are being saved.
The most common command for running unit tests is `mvn test`, I would suggest running the command against the project locally, to determine where the test result files are being generated. I think by default, bamboo is looking for any xml files in a directory called "test-results".
The search pattern bamboo is using can be controlled using the "Custom Results Directories" configuration of the JUnit parser.