Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Yet another puppeteer browser provider plugin for testcafe

License

Notifications You must be signed in to change notification settings

elmy-team/testcafe-browser-provider-puppeteer-launcher

 
 

Repository files navigation

testcafe-browser-provider-puppeteer-launcher


Warning

This browser provider is deprecated as it is no longer being maintained.


Yet another 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-launcher

Usage

When you run tests from the command line, use the provider name when specifying browsers:

testcafe puppeteer-launcher '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-launcher')
    .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-launcher: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-launcher:no_sandbox?/usr/bin/chromium-browser'])


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

Author

Jacek Dobosz

Contributors

Lukasz Szmit

Pedro Scaff

Bhavdeep Dhanjal

About

Yet another puppeteer browser provider plugin for testcafe

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%