Karma runs our project's tests, and I would like to run some UI tests with karma-selenium-webdriver-launcher.
I notices some example code that looks like this (see original)
var By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until,
chrome = require('selenium-webdriver/chrome');
module.exports = function(config) {
config.set({
customLaunchers: {
swd_chrome: {
base: 'SeleniumWebdriver',
browserName: 'Chrome',
getDriver: function(){
// example from http://ift.tt/1Mk8RCm
var driver = new chrome.Driver();
return driver;
}
}
},
// 'PhantomJS' already works in our configuration. 'swd_chrome' is the new thing we want to use...
browsers: ['PhantomJS', 'swd_chrome'],
});
};
How do I specify that most tests (ie. unit tests) should only be run in Phantom while others (ie. UI tests) should run chrome?
Aucun commentaire:
Enregistrer un commentaire