Running multiple browsers with testcafe using codeceptjs run-multiple --all
The process seems to hang and teardownAll never fires

exports.config = {
output: './e2e_tests/output',
helpers: {
TestCafe: {
url: 'https://dev-server.com',
browser: 'browserstack:[email protected]:OS X Mojave',
show: true,
},
ResembleHelper: {
require: 'codeceptjs-resemblehelper',
screenshotFolder: './e2e_tests/tests/output/',
baseFolder: './e2e_tests/tests/screenshots/base/',
diffFolder: './e2e_tests/tests/screenshots/diff/',
},
},
include: {
I: './e2e_tests/steps_file.js',
},
mocha: { bail: true },
bootstrap: null,
teardown: null,
hooks: [
// './e2e_tests/hooks/event.all.after.js',
],
gherkin: {
features: './e2e_tests/features/*.feature',
steps: ['./e2e_tests/step_definitions/steps.js'],
},
plugins: {
screenshotOnFail: {
enabled: true,
},
},
tests: './e2e_tests/tests/**/*.test.js',
name: 'polaris-siteapp',
multiple: {
basic: {
grep: '(?=.*)^(?!.*@visual-test)',
// List available browserstack browsers
// node ./node_modules/testcafe/bin/testcafe.js -b browserstack
browsers: [
'chrome',
'safari',
// 'browserstack:[email protected]:OS X Mojave',
// 'browserstack:[email protected]:Windows 10',
// 'browserstack:[email protected]:Windows 10',
],
},
},
teardownAll: (done) => { console.log('DUN'); done(); },
};
I second that one. It's also can be reproduced when you're trying to use chunks to run tests in parallel.
Steps to reproduce:
git clone [email protected]:Vla8islav/codeceptjs-multireporter-test.git
cd codeceptjs-multireporter-test
docker build -t codecept-chrome:latest . && docker run codecept-chrome:latest
main process
CMD npx codeceptjs run-multiple parallel
just hangs after executing tests.
It also can be reproduced without a docker.
"dependencies": {
"codeceptjs": "^2.3.5",
"testcafe": "^1.6.1"
}
I suggest removing an example
multiple: {
parallel: {
// Splits tests into 2 chunks
chunks: 2
}
},
from the documentation untill an issue is fixed.
I am also seeing issues when feature file has more than one scenario defined, it does not run the Second Scenario and process hangs or throws below error,
2) Search Github @search
"after each" hook: codeceptjs.after for "Fred should see the highlighted results for the searched repository @search_results":
connect ECONNREFUSED 127.0.0.1:4444
rror: connect ECONNREFUSED 127.0.0.1:4444
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1054:14)
I have this problem too, any update?
Hi,
Is there any updates?
I have similar issue. I have visual tests. I am using Resemble.
Command to execute:
npx codeceptjs run-multiple parallel --reporter mocha-multi
All tests are executed , but proces hangs after that and teardownAll is not executed, I have to kill it myself manually and then execute teardownAll task manually.
My config
exports.config = {
tests: './tests/*_test.js',
output: './report',
bootstrapAll: './bootstrapAll.js',
teardownAll:'./teardownAll.js',
multiple: {
parallel: {
chunks: 4
}
},
mocha: {
"reporterOptions": {
"codeceptjs-cli-reporter": {
"stdout": "-",
"options": {
"verbose": false,
"steps": true
}
},
"mocha-junit-reporter": {
"stdout": "./report/jconsole.log",
"options": {
"mochaFile": "./report/result.xml"
}
},
"mochawesome": {
"stdout": "./report/mconsole.log",
"options": {
"reportDir": "./report",
"reportFilename": "report"
},
"attachments": true
}
}
},
helpers: {
Puppeteer: {
url: 'http://xxxxxxxx:7777',
show: false,
windowSize: "1920x1080",
waitForNavigation: [ "domcontentloaded", "networkidle0" ],
waitForAction:1000,
waitForTimeout:30000
},
HooksHelper: {
require: './helpers/hooksHelper.js'
},
ResembleHelper : {
require: "codeceptjs-resemblehelper",
screenshotFolder : "./report/",
baseFolder: "./tests/screenshots/base/",
diffFolder: "./report/diff/"
},
Mochawesome: {
uniqueScreenshotNames: true
}
},
}
Have you tried with latest version 2.6.0?
Hi thanks, I will try and let you know. Currently I am using 2.5.0.
Hi, updated to 2.6.0. Still the same process doesn't end.
any luck with this issue ?
any luck with this issue ?
Hi, partly.
with these settings for puppeteer is more stable. Especialy restart : false
Puppeteer: {
url: 'xxx.xxx',
show: false,
windowSize: "1920x1080",
waitForNavigation: [ "domcontentloaded", "networkidle0" ],
waitForAction:1000,
waitForTimeout:30000,
restart:false,
chrome: { args: ['--enable-font-antialiasing', '--no-sandbox', '--disable-setuid-sandbox', '--font-render-hinting=none'], ignoreDefaultArgs: ["--hide-scrollbars"]}
},
Most helpful comment
Hi, updated to 2.6.0. Still the same process doesn't end.