Open JOEAV opened 6 years ago
Hi @JOEAV,
You need to create multiple Chromy instances that have different port to run in parallel.
example:
const Chromy = require('chromy')
let port = 9222
let promises = []
for (let i = 0; i < 4; i++) {
let chromy = new Chromy({port: port++})
let p = chromy.chain().goto('http://example.com').end().then(() => chromy.close())
promises.push(p)
}
Promise.all(promises).then(() => {
console.log('done')
})
thanks very much ill try it and will reply asap ! have a great day
Hi , i'm trying to integrate chromy with my jasmine E2E testing environment(headless mode) . this is my chrome conf file .
const Chromy = require('chromy') const logger = require('../spec/specLogger') const specUtils = require('../spec/specUtils') const constants = require('../spec/specConstants') const colors = require('colors'); const timeout = 2 * 60000
const chromy = new Chromy({waitTimeout: timeout, gotoTimeout: timeout, evaluateTimeout: timeout})
const chrome = chromy.chain();
const runnerNames = specUtils.getRunnerNames(); runnerNames.forEach(runnerName => { const urlParams = { query: { jasmineSpec: constants.jasmineSpec + runnerName, }, runnerName: runnerName }
})
as first look , i thought it should run the tests parallel but it seems it runs sync. any thoughts how can i run the instances parallel ? thanks in advance!