Puppetry
3.2.2
3.2.2
  • Welcome Puppetry
  • Getting Started
  • Project
  • Suite
  • Group
  • Target
    • Simple Target
    • iFrame Target
    • ShadowDOM Target
    • Chained Target
    • Shared Target
  • Test Case
  • Test Step / Action
    • Page Commands
    • Page Assertions
    • Target Commands
    • Target Assertions
  • Managing Records
  • Snippets
  • Running tests
    • Interactive Mode
    • Troubleshooting
  • Test Report
  • Export
    • Exporting as Jest Project (CI-friendly)
    • Exporting as Test Specification
  • Settings
  • Template Expressions
  • Testing Techniques
    • Testing Dynamic Content
    • Exhaustive Testing
    • Performance Testing
    • Visual Regression Testing
    • Testing Shadow DOM
    • Testing Google Analytics tracking code
    • Testing Chrome Extensions
    • Testing REST API
    • Mocking HTTP/S Requests
    • Testing Transactional Emails
      • Example with Restmail.net
      • Example with Mailinator
      • Example with IMAP bridge
      • Example with Google API
    • Testing Forms with Captcha
  • Version Control
  • Tips and Tricks
    • Embrace the Power of CSS
  • Command API
  • Test Application
Powered by GitBook
On this page
  • Selecting Staging Environment
  • Browser Options
  • Connecting to Chrome
  • Running tests

Was this helpful?

Running tests

PreviousSnippetsNextInteractive Mode

Last updated 5 years ago

Was this helpful?

When we are ready with our test suite we can run the tests. Click on Run.. item in the main menu (or press F6).

You get Run Tests modal window

Selecting Staging Environment

Browser Options

We can use Browser options tab to adjust the runner

On this panel we can select a browser to run the tests:

Available options are:

Connect to Chrome - connecting to a running instance of Chrome

Browser-specific options:

  • DevTools - enables Chrome DevTools in the browser

  • maximized - maximizes the browser window

  • fullscreen - switches the browser in fullscreen mode

  • ignore HTTPs errors - tolerates HTTPs errors like invalid certificate

Connecting to Chrome

There are some cases when we need to connect to a ruining instance of chrome instead of starting a new one. For example to bypass reCaptcha we can solve it manually in Chrome and then run the tests on it.

In order to connect we need to start Chrome in command-line with remote-debugging-port parameter.

start chrome.exe –remote-debugging-port=9222 --user-data-dir=remote-profile
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=$(mktemp -d -t 'chrome-remote_data_dir')
google-chrome --remote-debugging-port=9222

Next we navigate in the started browser to http://127.0.0.1:9222/json/version. On the page we can see a JSON object.

We shell copy the value of webSocketDebuggerUrl property. Open Run Tests modal window (F6), switch to Browser options tab and paste the saved value into WS Endpoint input.

Now we can press Run.

Running tests

Learn more about "interactive mode" option in

Learn more about "update comparison images" option in

The modal window allows you to select a :

allows running in a headless/server environment. In this mode the test will run considerably faster.

is an open-source web browser, which is used as basis for Google Chrome browser. Puppetry downloads and uses a specific version of Chromium so its API is guaranteed to work out of the box.

is a cross-platform web browser developed by Google.

is a free and open-source web browser developed by the Mozilla Foundation.

incognito window - runs the tests in

Besides you can manually provide any in the textbox below.

You can also specify location of Chrome extension. Learn more

As we press Run button the tests are sent to Jest and we have to wait for

Interactive mode
CSS Regression Testing
target environment
Headless Chromium
Chromium
Chromium
Google Chrome
Mozilla Firefox
private session
Chromium command line options
here
Test Report
Run tests menu item
Choosing staging environment
Browser options tab
Picking up a browser
Obtaining webSocketDebuggerUrl
Connect to chrome option
Tests are running