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

0 votes

Hello Aakash,

You can use Maven task to execute Maven build and tests. Please find more details at our documentation

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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

185 views 4 1
Join discussion

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