Jankins Karma Integration

216 views
Skip to first unread message

chirath...@yahoo.com

unread,
Oct 20, 2014, 11:49:20 PM10/20/14
to karma...@googlegroups.com
I am using Karma for unit testing my JS code & test task is run via gulp with Chrome. Everything works as expected.

I have now done  a Jenkins CI integration where gulp test task is called as a batch file, however the build fails with

  [33mWARN [launcher]: [39mChrome have not captured in 30000 ms, killing.
 [36mDEBUG [launcher]:  [39mProcess Chrome exited with code 0
 [36mDEBUG [temp-dir]:  [39mCleaning temp dir C:\Users\ADMINI~1\AppData\Local\Temp\karma-88920045
 [32mINFO [launcher]:  [39mTrying to start Chrome again (1/2).
 [36mDEBUG [launcher]:  [39mRestarting Chrome
 [36mDEBUG [temp-dir]:  [39mCreating temp dir at C:\Users\ADMINI~1\AppData\Local\Temp\karma-88920045
 [36mDEBUG [launcher]:  [39mC:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=C:\Users\ADMINI~1\AppData\Local\Temp\karma-88920045 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:9191/?id=88920045

If I setup PhantomJS the test would run properly via Jenkins, but some of my libraries are incompatible with Phantom.

Is it valid to run Chrome/FF & IE as the browser when Karma is initiated via CI? Any clue on error I am getting?

Thanks

Vojta Jína

unread,
Jan 26, 2015, 7:12:38 PM1/26/15
to karma...@googlegroups.com
Yes, it is valid to use Karma with Chrome/FF on a CI server such as Jenkins. Many projects do this.

Does your CI server has a screen? That might be the reason why Chrome does not start. You can try using a virtual buffer such as xvbf, or use external service for providing the browser such as SauceLabs or BrowserStack.

--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/karma-users/947c817a-8229-4042-a8de-6466f61f1114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Krinkle

unread,
Mar 4, 2015, 1:13:02 PM3/4/15
to karma...@googlegroups.com
I recently started adopting Karma at Wikimedia Foundation (using Jenkins).
I'm quite happy with the results so far.

Initially things seemed to be working fine, but we're experiencing a lot of race conditions.
Filed https://github.com/karma-runner/karma/issues/1321 with our findings so far.

Some pointers on how to debug this further would be much appreciated (on-list, off-list, or ping me on Freenode IRC, Krinkle, or #wikimedia-dev)

-- Krinkle

Mark Trostler

unread,
Mar 4, 2015, 9:38:13 PM3/4/15
to karma...@googlegroups.com
I would like to see you try the canary branch of Karma. It upgrades socket.io that had potentially been the source of other race condition failures. Can you try it out?  It's npm version 0.12.32-beta.0
thanks!
 Mark

Krinkle

unread,
Mar 10, 2015, 11:34:50 AM3/10/15
to karma...@googlegroups.com
Thanks. I gave it a try but fails the same way when run concurrently.

In isolation it still passes (no regression there). And it seems to run a little bit faster (5-10%).


-- Krinkle

To unsubscribe from this group and stop receiving emails from it, send an email to karma-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages