hermione-headless-chrome

1.1.1 • Public • Published

hermione-headless-chrome

Plugin for hermione to run integration tests on downloaded headless Chromium.

NB: plugin searches builds starting from last stable version, but downloaded developers version. Builds for some versions may not be found. Detail information on article.

You can read more about hermione plugins here.

Installation

npm install hermione-headless-chrome

Usage

  • enabled (optional) Boolean – enable/disable the plugin; by default plugin is enabled.
  • browserId (required) String - browser id on hermione config for headless Chromium.
  • version (optional) Boolean - Chromium version; latest stable version by default.
  • cachePath (optional) String - path to directory for downloaded Chromium binary; /hermione-headless-chrome on home directory by default.
  • downloadAttempts (optional) Number - attempts count for download Chromium; 30 by default.

Also there is ability to override plugin parameters by CLI options or environment variables (see configparser). Use hermione_headless_chrome_ prefix for the environment variables and --headless-chrome- for the cli options.

For example you can override browserId option like so:

$ hermione_headless_chrome_browser_id=some-browser-id hermione
$ hermione --headless-chrome-browser-id some-browser-id

Add plugin to your `hermione` config file:

```js
module.exports = {
    // ...
    browsers: {
        'example-browser-id': {
            desiredCapabilities: {
                browserName: 'chrome',
                browserVersion: '123.0'
            }
        }
    },
    // ...
    plugins: {
        'hermione-headless-chrome': {
            enabled: true,
            browserId: 'example-browser-id',
            version: '123'
        }
    },
    //...
}

Testing

Run mocha tests:

npm run test-unit

Run eslint codestyle verification

npm run lint

Package Sidebar

Install

npm i hermione-headless-chrome

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

21 kB

Total Files

10

Last publish

Collaborators

  • dudagod
  • sipayrt
  • xrsd
  • thenech
  • kuznetsovroman