Comments (12)
@karma-runner will you have a look at this?
from karma-sauce-launcher.
In my project I simply define multiple grunt tasks, and run them sequentially:
karma: {
sauce1: {
configFile: 'karma-sauce.conf.js',
browsers: ['SL_IE_9', 'SL_IE_10']
},
sauce2: {
configFile: 'karma-sauce.conf.js',
browsers: ['SL_Chrome', 'SL_Safari']
}
}
I also use a solution similar to this answer to always run the tests in all browsers, even if tests in the first one fail.
Of course, this only works when using singleRun: true
.
My full config: Gruntfile.js and karma.conf.js.
from karma-sauce-launcher.
@rkistner thanks alot! That should solve my problems. Smart to use multiple grunt tasks, didn't think of that :)
from karma-sauce-launcher.
@rkistner do you also have a solution to mark browser runs passed/failed perhaps?
from karma-sauce-launcher.
@wnr Unfotunately I don't. I'll log it as a separate issue.
from karma-sauce-launcher.
@rkistner okay cool :)
from karma-sauce-launcher.
This was fixed by karma-runner/karma#57, which was released in karma 0.11.0 (npm install karma@canary
).
No need to specify the concurrency limit - the first browsers start running the tests immediately, and the next batch are queued and run as soon as the first ones have finished.
from karma-sauce-launcher.
Oh okay, cool :) Thanks a bunch
from karma-sauce-launcher.
Thanks @rkistner for sharing your setup! I ended up doing the same thing but also in a way that separate karma tasks are created dynamically of given sauce lab browser setup: karma.conf.js, saucelabs-browsers.js, Gruntfile.js check also sauce
task.
from karma-sauce-launcher.
@rkistner Expansion using caolan's async
library.
grunt.registerTask('tests', function() {
var done = this.async();
var series = [];
var success = true;
var tasks = {};
Object.keys(grunt.config.data.karma).forEach(function(key) {
if (key === 'options') {
return;
}
var task = 'karma:' + key;
tasks[task] = 0;
series.push(function(callback) {
grunt.util.spawn({
args: [task],
grunt: true,
opts: {
stdio: 'inherit'
}
}, function(error, result, code) {
tasks[task] = code;
if (code !== 0) {
success = false;
}
callback();
});
});
});
async.parallelLimit(series, 1, function() {
done(success);
});
});
from karma-sauce-launcher.
@kimmobrunfeldt This doesn't actually flag the browser as having failed in saucelabs
. Did you manage to do anything further to get that to work?
from karma-sauce-launcher.
see #40 and karma-runner/karma#1646.
from karma-sauce-launcher.
Related Issues (20)
- undefined SaucelabsReporter adapters causes single-run=false to fail HOT 1
- Breaking change for iPhone Simulators caused by node-saucelabs version bump HOT 10
- Error is thrown when trying to run the connector HOT 12
- Error when mixing browser launched on SauceLabs and others HOT 1
- Uncaught TypeError: Cannot read property 'deleteSession' of null HOT 2
- Internet Explorer times out with Karma 6.x HOT 3
- Error for Safari & Chrome 38 on karma 6.x HOT 14
- Pass custom command line flags HOT 5
- No test names are being set, `undefined` instead HOT 8
- Update webdriverio to v7 HOT 2
- failed serving request POST /wd/hub/session: Unauthorized HOT 2
- Unable to connect to Saucelabs
- Running examples fails to compile
- Sauce Connect v4.6.4 to be deprecated 31 Jan 2022 HOT 2
- Checking for the stored log never terminates if the network is down
- Test fails under Firefox GeckoDriver 0.31.0 HOT 4
- ERROR webdriver: unknown error: failed serving request POST /wd/hub/session: Unauthorized HOT 1
- Dependency updates?
- Appium 2 compatibility
- Error from SauceLabs after updating dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-sauce-launcher.