I currently have Protractor set up to run multiple Chrome instances so that I can run my tests in parallel. However, I've noticed that the tests in one browser instance are influencing tests in another browser instance. For example, if I have one test that opens a drop-down menu, I see the drop-down menu open in the other browser instances, even though that has nothing to do with the other tests. Why would this occur? Can someone provide assistance for how I can run tests in parallel in isolation?
conf:
'use strict';
exports.config = {
baseUrl: 'http://localhost:8080/',
specs: [
'./tests/**/*.spec.js'
],
exclude: [],
suites: {
testsA: './tests/tests-a/*.spec.js',
testsB: './tests/testsB/*.spec.js',
testsC: './tests/testsC/*.spec.js'
},
framework: 'jasmine2',
allScriptsTimeout: 110000,
jasmineNodeOpts: {
showTiming: true,
showColors: true,
isVerbose: false,
includeStackTrace: false,
defaultTimeoutInterval: 400000
},
directConnect: true,
capabilities: {
browserName: 'chrome',
shardTestFiles: 'true',
maxInstances: 5
},
onPrepare: function () {
let SpecReporter = require('jasmine-spec-reporter');
// add jasmine spec reporter
jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true}));
browser.ignoreSynchronization = false;
require('babel-core/register')({ 'presets': [ 'es2015' ] });
},
/**
* Angular 2 configuration
*
* useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching
* `rootEl`
*
*/
useAllAngular2AppRoots: true
};