Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Bamboo to work with codeception?

I have been trying to get Bamboo working with codeception tests. I am using codeception to test my code in a symfony project.

After some research I found an article on how to setup Jenkins with codeception.

Once read I figured out that I should use Ant to run the codeception commands that run the tests.

The problem is I don't really know where to put everything. This article explains all the fields for a new Ant task but nothing seem to work.

Can someone please help me?

like image 531
Robin Hermans Avatar asked Oct 31 '13 12:10

Robin Hermans


People also ask

How do I get Started with bamboo?

Install and start Bamboo Once it's started, you can access Bamboo in your browser at http://localhost:8085/. 2. Set up notifications 3. Get building with Bamboo Bamboo has the concept of a 'plan' to look after the configuration for a build. So, to run your first build, you create and run a plan:

How do I create a new project in bamboo?

Create a project and plan A Bamboo plan specifies the source code repository, the tasks to run in your build, and when to trigger a build. We start by creating a new plan: Log into your Bamboo instance as a user with permissions to create plans. Select Create > Create plan from the menu bar.

How does the build report work in bamboo?

Bamboo will: The 'Plan summary' tab will report whether the build succeeded or not. Tests in the appropriate directory in the source code repository will be run automatically as part of the build, and the test results will be displayed in Bamboo.

Why use codeception’s modules?

Each module provides predefined actions for different testing purposes, and they can be combined to fit the testing environment. Codeception tries to solve 90% of possible testing issues in its modules, so you don’t have to reinvent the wheel.


1 Answers

In case anyone else comes across this, this is how I have gotten codeception working in bamboo.

In Admin > Server Capabilities. Add a new executable for Codeception with the path /usr/local/bin/codecept.

In your job, create a new task of type Command. Set the executable as Codeception. The arguments should be run --xml (and any others you need).

Next, create another task with the type of JUnit Parser. Set the custom results directory to tests/_log/*.xml.

This works perfectly for me.

Additional: If you do not have admin rights to the server, set the command executable as PHP and add ./vendor/bin/codecept run --xml as the arguments.

like image 121
Travis B Avatar answered Oct 13 '22 19:10

Travis B