@SevenOutman: I'm having a hard time setting up karma-browserstack-launcher to run in GitHub Actions as recorded in rsuite/rsuite#1707. Can't have it running and can't find a running example either. Opened several issues but got no response.
Aye, I'd recommend against parallel jobs in that way. That shouldn't be needed since karma manages concurrency for you already. If you must separate them, it'll require a stronger separation in the config. I also don't know if that might run into a quota limit. Afaik it allows many parallel browsers, but not sure if it can also allow the same number of parallel tunnels.
QUnit is using browserstack-runner.
Oops, that's my bad, yes. We don't use karma in the actual qunit repo right now, but that's only because karma-qunit imports the qunit module on its own, which is great, unless you are qunit itself, in which case that wouldn't test what we want it to test. I'll likely change that to use karma-tap at some point, and then naturally use karma-browserstack-launcher.
echo $DISPLAY
say?
Aye, I'd recommend against parallel jobs in that way. That shouldn't be needed since karma manages concurrency for you already. If you must separate them, it'll require a stronger separation in the config. I also don't know if that might run into a quota limit. Afaik it allows many parallel browsers, but not sure if it can also allow the same number of parallel tunnels.
@Krinkle Thanks! I managed to run multi-browser tests in a single job. But there's one thing I can't achieve with single job is that it can't generate coverage separately for each browser (in case source code was executed differently in different browsers).
hey, quick question: I've got an angular 4 app I've inherited and while I got the tests consistently running and above 80% it takes 15+ min to run all the tests.
prior to doing any massive changes to optimize things i figured i would try for concurrency to see fi i could get a 2-3x multiplier to the speed.
I am using a recent version of Karma(6.3.4) and i notice that i should have some concurrency by default(infinity) even when i override that with an integer(3) i still only see one browser instance opening.
anyone have an idea what could cause the runner to not run concurrently?
@bobby2004170 The launcher for Firefox lives at https://github.com/karma-runner/karma-firefox-launcher. It seems WebGL was not disabled there, but rather it is (or was) disabled in upstream Firefox itself when in Headless mode, thus there is no way for us to enable it other than to launch "Firefox" instead of "FirefoxHeadless" (this should work locally but may require Xvfb in CI or other virtual contexts).
I do note that there is a bugzilla ticket for this, according to which WebGL is no longer disabled for Firefox on macOS and Windows as of Firefox 91 (released Aug 2021).
https://bugzilla.mozilla.org/show_bug.cgi?id=1635451
mozilla/gecko-dev@a8d8e90
Hi
I'm running karma start inside an angular 13 app and I get the following error :You need to include some adapter that implements __karma__.start method!
dependencies have the following versions:
"karma": "~6.3.17",
"karma-chrome-launcher": "~3.1.1",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
Can anyone help me, please ?
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-jasmine-seed-reporter'),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './output/coverage/try'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'lcov', file: 'lcov.info' }],
},
reporters: ['progress', 'kjhtml', 'jasmine-seed'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: ['--headless', '--disable-gpu', '--remote-debugging-port=9222', '--no-sandbox'],
},
},
});
};