Coder Social home page Coder Social logo

plesiecki / testcafe-browser-provider-puppeteer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jdobosz/testcafe-browser-provider-puppeteer

0.0 0.0 0.0 578 KB

This is the puppeteer browser provider plugin for testcafe

License: MIT License

JavaScript 100.00%

testcafe-browser-provider-puppeteer's Introduction

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

testcafe-browser-provider-puppeteer's People

Contributors

alivenotions avatar jdobosz avatar lszm avatar ptashek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.