how do i do unit test in bamboo from maven

Hi Support Team,

I have a OSB project and maven build script.I am not sure how to carry out the unit test via Bamboo for the project. Can anyone help me to do the unit test automation through Bamboo?

1 answer

This widget could not be displayed.

Hello Aakash,

You can use Maven task to execute Maven build and tests. Please find more details at our documentation https://confluence.atlassian.com/display/BAMBOO/Maven

Thanks Alexey, But I have a OSB based project,its not a java based project. I just want to understand the core concept how unit testing goes, Can you please tell me what are the necessary steps/items that we need to follow? I mean like do we need to write a test case code seperately and what are the information do we need to include in maven POM file. your answer will be highly appreciated.

Aakash, I'm not familiar with OSB, but you mentioned Maven. What is going on when you execute "mvn test" command at your project? Does it run tests? Does it generate any test report at target/surefire-reports? To identify tests Bamboo can use Maven task or separate JUnit/NUnit tests parsers. So if your maven execute tests and generate reports with surefire plugin - Bamboo can handle it, otherwise you will require another plugin to provide tests results to Bamboo Hope it helps

Alexey, I have a OSB based project and maven as a build script,I am not sure wheather my script file is good enough or not? When I run "mvn test" it says no test to run. What should I do to execute the test via Bamboo?

Aakash, do you know if it's possible to execute tests in your project with command line from console? If it's possible then Bamboo can do it. If you need some UI tool to execute tests in your project - Bamboo can't run them without additional steps

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 7 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

36 views 0 5
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