tbp
testcafe-browser-provider-puppeteer
npm i testcafe-browser-provider-puppeteer
tbp

testcafe-browser-provider-puppeteer

This is the puppeteer browser provider plugin for testcafe

by Jacek Dobosz

1.5.2 (see all)License:MITTypeScript:Not Found
npm i testcafe-browser-provider-puppeteer
Readme

testcafe-browser-provider-puppeteer

Build Status npm version

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.

Install

npm install --save-dev testcafe-browser-provider-puppeteer

Usage

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();

Device Emulation

If you want to emulate another device you can run pupeteer:emulate=<Device name>. The supported devices are listed in the Puppeteer DeviceDescriptors.

Troubleshooting

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'

In order to speedup CI you can provide custom executable of chromium browser instead to download it all the time:

runner
  .browsers(['puppeteer:no_sandbox?/usr/bin/chromium-browser'])


runner
  .browsers(['puppeteer:?/usr/bin/chromium-browser'])

Author

Jacek Dobosz

Contributors

Lukasz Szmit

Pedro Scaff

Bhavdeep Dhanjal

Downloads/wk

1.5K

GitHub Stars

47

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

5

OPEN ISSUES

4

OPEN PRs

13
VersionTagPublished
1.5.2
latest
2yrs ago
No alternatives found
No tutorials found
Add a tutorial