how do i do unit test in bamboo from maven

Aakash Basnet July 28, 2015

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
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 5, 2015

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

Aakash Basnet August 7, 2015

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.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2015

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

Aakash Basnet August 7, 2015

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?

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2015

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
TAGS
AUG Leaders

Atlassian Community Events