gesalakacula
Generate SauceLabs Karma Custom Launchers --- aka --- Ge-Sa-La-Ka-Cu-La-aaaaa
It's intention is to be used with karma and karma-sauce-launcher, which runs unit tests on the Sauce Labs browsers.
Installation
gesalakacula
can be installed using
$ npm i -D gesalakacula
Usage
// In your karma.conf.jsvar geSaLaKaCuLa = ; module { var customLaunchers = // [...] configbrowsers = Object; configcustomLaunchers = customLaunchers;});
Config Object
gesalakacula
generate launchers from a config object.
This one has 3 main areas:
// The platforms (1) 'Linux': // The browsers (2) 'chrome': // The versions (3)
You're suppose to use the Sauce Labs platform(1)
/browser(2)
/versions(3)
combos.
For the versions(3)
you can use an array or a range string like : \d+..\d+
.
Sample
« All The Sauce Labs Browsers Are Mine To Test ! GeSaLaKaCuLa-aaaaa ! »
;// Run on every platforms-browsers-versions on Sauce Labs (known 2015/1/1)
Check my dummy fuzzy batman for more
Extra: Re-Ka-La-Re-Ka-La-Re-Ka-La
Sauce Labs provide free accounts for open source project with
- Unlimited testing minutes
- 5 parallel tests
Karma is a bit difficult to configure with Sauce Labs. Like there is no "queue" principal, Karma try to connect to all the browsers at the same time. There for when a browser in the Sauce Labs queue will often reach the browserDisconnectTimeout
and cause the test to fail without actually running them.
So I came with a simple idea of recursively restarting a karma server with the 5 parallel browsers limit of Sauce Labs.
Thus, there is not potential browserDisconnectTimeout
of browser in the Sauce Labs queue...
Usage
var reKaLa = geSaLaKaCuLarecursiveKarmaLauncher; ;
.recursiveKarmaLauncher(opts, doneCallback)
opts
: The options for reKaLa
(TODO can be using as extended karma options ?)
require :
{
karma: require('karma').server
}
default :
{
configFile: './karma.conf.js',
customLaunchers: {},
maxConcurrentRun : 5
}
doneCallback
: will be call at the recursion end with the incremented exit code (of each karma run).
License
Copyright © 2014 Douglas Duteil <douglasduteil@gmail.com>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENCE file for more details.