Re: Build in xvfb support into the browser launchers

341 views
Skip to first unread message

Vojta Jína

unread,
Mar 7, 2014, 6:02:25 PM3/7/14
to karma...@googlegroups.com
Marco, this is a great idea!

Would you be interested in sending a PR?


On Wed, Mar 5, 2014 at 3:20 AM, Marco de Jongh <m.jo...@gmail.com> wrote:
After some more examination of how karma works i concluded it would be best to do this via a option in the karma config.
I have taken the liberty of forking karma and adding it to the launcher js

Please note that this is only a POC, I have tested this on the projects i currently use karma for and it works very well. It also lets me run our test suite in 10s instead of the 30s it usually takes to run it.
If this is they correct way of fixing it I'd be more than happy to write some unit tests and creating a pull request.

Op woensdag 5 maart 2014 11:35:03 UTC+1 schreef Marco de Jongh:
I was wondering why xvfb support is not build in the launchers for chrome and firefox.
For example for chrome you would then specify chromeHeadless as the browser to use.
If chromeHeadless is used, the launcher should check if xvfb is available if not it should warn about it and just run the browser.

Easiest way to implement it when xvfb IS available, is to use https://www.npmjs.org/package/xvfb 
Or to include a copy of the xvfb-run.sh script prepackaged in a lot of linux distros into the node module and use that script.


Advantages:
* It would make setting up of CI easier
* It would raise more awareness of the existence of the option to run chrome headless
* Would make PHPStorm integration even better

Bonus advantage:
* It would give me an extra argument to convince my windows using colleagues to switch to a superior OS ;)

I already hacked the chrome launcher I have locally and included xvfb-run in front of the default command in linux and it works fine.

--
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/81d4c45a-ec59-4a26-b386-ac3f97949f14%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Marco de Jongh

unread,
Mar 11, 2014, 9:50:28 AM3/11/14
to karma...@googlegroups.com
Haha i actually deleted this because is suspected this was not something anybody would be interested in.
But ill submit a pr this evening after adding some tests for it

Op zaterdag 8 maart 2014 00:02:25 UTC+1 schreef Vojta Jína:

Krinkle

unread,
Mar 4, 2015, 1:07:29 PM3/4/15
to karma...@googlegroups.com
I filed https://github.com/karma-runner/karma/issues/1320 as a reminder.

I'd be interested in helping out with this as well. I'm quite new to the Karma code base though, so some pointers would be nice.

-- Krinkle
Reply all
Reply to author
Forward
0 new messages