How to integrate Karma with Bamboo

Usually my "grunt test:client" triggers a Karma Server to be started and my Unit Tests.


When running grunt test:client as Bamboo Task, I am getting this output:


11-Jun-2015 12:29:48Running "injector:karma" (injector) task
11-Jun-2015 12:29:48Missing option `template`, using `dest` as template instead
11-Jun-2015 12:29:48Injecting js files (52 files)
11-Jun-2015 12:29:48>> Nothing changed
11-Jun-2015 12:29:49 
11-Jun-2015 12:29:49Running "autoprefixer:dist" (autoprefixer) task
11-Jun-2015 12:29:49 
11-Jun-2015 12:29:49Running "coffee:glob_to_multiple" (coffee) task
11-Jun-2015 12:29:49>> 21 files created.
11-Jun-2015 12:29:50 
11-Jun-2015 12:29:50Running "karma:unit" (karma) task
11-Jun-2015 12:29:50Fatal error: connect ECONNREFUSED
11-Jun-2015 12:29:50 
11-Jun-2015 12:29:50 
11-Jun-2015 12:29:50Execution Time (2015-06-11 10:29:46 UTC)
11-Jun-2015 12:29:50loading tasks             95ms  ??? 2%
11-Jun-2015 12:29:50env:test                  41ms  ??? 1%
11-Jun-2015 12:29:50coffee:glob_to_multiple  708ms  ????????????????????? 18%
11-Jun-2015 12:29:50mochaTest:src             1.1s  ????????????????????????????????? 28%
11-Jun-2015 12:29:50injector:scripts          43ms  ??? 1%
11-Jun-2015 12:29:50injector:karma           210ms  ?????? 5%
11-Jun-2015 12:29:50coffee:glob_to_multiple     1s  ?????????????????????????????? 26%
11-Jun-2015 12:29:50karma:unit               681ms  ????????????????????? 17%
11-Jun-2015 12:29:50Total 3.9s


This is the to be expected output:


Running "coffee:glob_to_multiple" (coffee) task
>> 21 files created.
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.32 server started at http://localhost:9126/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket S7VZ6KyGOoprNVsXAAAA with id 25621038

Now obvsly it cant start the server. Any ideas how to fix? Also I then want to move to creating a reporter-ready, consumable XML or JSON file, but that is probably for another thread.

1 answer

This widget could not be displayed.

Seriously, could you guys at atlasian make karma with phantom run okay? I am also having issues where it says that the phantom server cannot start during the build proces using bamboo :/

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
Posted 8 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

21 views 0 0
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