rschuft / karma-sharding Goto Github PK
View Code? Open in Web Editor NEWKarma plugin to allow tests to be distributed across multiple browsers
License: MIT License
Karma plugin to allow tests to be distributed across multiple browsers
License: MIT License
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
**I'm submitting a .. **
Do you want to request a feature or report a bug?
Bug:
only() doesn't work like it does when you don't use sharding, and not documented in the readme
What is the current behavior?
readme says nothing about only() or how to get around it.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
plnkr probably not needed, as this is a simple use case.
When the above is done, both tests run, one in each browser.
What is the expected behavior?
It should run the only() test in 1 browser and nothing in the other browser.
Otherwise, the docs should at least warn about this issue, and maybe suggest workarounds.
What is the motivation / use case for changing the behavior?
Consistency of use and/or completeness of documentation.
Please tell us about your environment:
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
I'm submitting a ...
Do you want to request a feature or report a bug?
What is the current behavior?
Split my tests on multiple browsers
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli', 'sharding'],
browserDisconnectTimeout : 10000,
browserDisconnectTolerance : 3,
browserNoActivityTimeout:60000,
plugins: [
require('karma-jasmine'),
require('karma-sharding'),
require('karma-chrome-launcher'),
require('karma-mocha-reporter'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
files: [
{ pattern: './src/test.ts', watched: false },
{ pattern: './node_modules/TimelineJS3/compiled/js/timeline.js', watched: false },
{ pattern: './node_modules/TimelineJS3/compiled/css/timeline.css', watched: false },
{ pattern: './node_modules/amcharts3/amcharts/amcharts.js', watched: false },
{ pattern: './node_modules/amcharts3/amcharts/pie.js', watched: false },
{ pattern: './node_modules/amcharts3/amcharts/gauge.js', watched: false },
{ pattern: './node_modules/amcharts3/amcharts/themes/light.js', watched: false }
],
reporters: ['mocha', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome','ChromeNoSandbox'],
customLaunchers: {
ChromeNoSandbox: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
singleRun: false
});
};
What is the expected behavior?
That the test was splitted in multiples browsers
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
**I'm submitting a ... **
Do you want to request a feature or report a bug?
bug
What is the current behavior?
The package.json specifies a version of karma 2.0.0 or above.
However, it appears that if you use karma 4.0.1, the sharding causes .only() to not work at all. So, even if you set .only() on an it() or describe(), it runs all of the tests (regardless of the number of browsers you set).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Rather than setting up a plunker, you can change the package.json file to specify karma 4.0.1, add a .only() to an it(), then run your test suite with 1 browser.
What is the expected behavior?
It (.only()) should work the same with 2.0.0 and 4.0.1.
What is the motivation / use case for changing the behavior?
We want .only() to work the same regardless of the version of karma.
Please tell us about your environment:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.