This is the puppeteer/chromium browser provider plugin for TestCafe. It allows to run tastcafe e2e tests headless in CI pipeline without any external dependency like xvfb, since everything what is needed is installed via npm.
npm install --save-dev testcafe-browser-provider-puppeteer
When you run tests from the command line, use the provider name when specifying browsers:
testcafe puppeteer 'path/to/test/file.js'
When you use API, pass the provider name to the browsers()
method:
testCafe
.createRunner()
.src('path/to/test/file.js')
.browsers('puppeteer')
.run();
On same older linux distributions, fails chromium due to sandbox issues - see this.
You can try in such case running the plugin without sandbox restriction
testcafe puppeteer:no_sandbox 'path/to/test/file.js'
Jacek Dobosz