diff --git a/README.md b/README.md
index ff62a93de..bf5e8b9e6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
Hermione
========
-Hermione is the utility for integration testing of web pages using [WebdriverIO](http://webdriver.io/) and [Mocha](https://mochajs.org).
+Hermione is a utility for integration testing of web pages using [WebdriverIO](http://webdriver.io/) and [Mocha](https://mochajs.org).
@@ -8,15 +8,15 @@ Hermione is the utility for integration testing of web pages using [WebdriverIO]
-- [Why should you choose hermione?](#why-should-you-choose-hermione)
+- [Why you should choose hermione](#why-should-you-choose-hermione)
- [Easy to use](#easy-to-use)
- - [Parallel test running](#parallel-test-running)
- - [Extensibility](#extensibility)
- - [Retries for failed tests](#retries-for-failed-tests)
- - [Executing a separate test](#executing-a-separate-test)
- - [Skip tests in specific browsers](#skip-tests-in-specific-browsers)
- - [Flexible tests configuration](#flexible-tests-configuration)
- - [Auto initialization and closing grid sessions](#auto-initialization-and-closing-grid-sessions)
+ - [Runs tests in parallel](#parallel-test-running)
+ - [Extensible](#extensibility)
+ - [Retries failed tests](#retries-for-failed-tests)
+ - [Executes separate tests](#executing-a-separate-test)
+ - [Skips tests in specific browsers](#skip-tests-in-specific-browsers)
+ - [Offers flexible test configuration](#flexible-tests-configuration)
+ - [Automatically initializes and closes grid sessions](#auto-initialization-and-closing-grid-sessions)
- [Prerequisites](#prerequisites)
- [Skip](#skip)
- [Only](#only)
@@ -52,85 +52,85 @@ Hermione is the utility for integration testing of web pages using [WebdriverIO]
-## Why should you choose hermione?
-`Hermione` provides several features which `WebdriverIO` doesn't and makes testing process easier.
+## Why you should choose hermione
+`Hermione` provides several features that `WebdriverIO` doesn't, and makes the testing process easier.
### Easy to use
-If you are familiar with [WebdriverIO](http://webdriver.io/) and [Mocha](https://mochajs.org), you can start writing and running tests in 5 minutes! You need to install `hermione` via npm and add a tiny config to your project. See details in [Quick start](#quick-start) section.
+If you are familiar with [WebdriverIO](http://webdriver.io/) and [Mocha](https://mochajs.org), you can start writing and running tests in 5 minutes! You need to install `hermione` via npm and add a tiny config to your project. For details, see the [Quick start](#quick-start) section.
-### Parallel test running
+### Runs tests in parallel
When tests are run one by one, it takes a lot of time. `Hermione` can run tests in parallel sessions in different browsers out of the box.
-### Extensibility
-`WebdriverIO` provides built-in commands for browser and page manipulation. Often projects need to store some common code and reuse it through all tests. So a developer should create some helpers and include them in the tests.
+### Extensible
+`WebdriverIO` provides built-in commands for browser and page manipulation. Often projects need to store some common code and reuse it throughout all tests, so the developer needs to create some helpers and include them in the tests.
-With `hermione` it's very simple and straightforward. You can add any number of custom commands in the hermione config and use them as `this.browser.myCustomCommand` in tests.
+With `hermione` this is very simple and straightforward. You can add any number of custom commands in the hermione config and use them as `this.browser.myCustomCommand` in tests.
-Moreover, `hermione` provides plugins which work as some kind of a hooks. They allow a developer to prepare environment for tests and react properly to test execution events.
+Moreover, `hermione` provides plugins that work like hooks. They allow the developer to prepare the testing environment and react properly to test execution events.
-### Retries for failed tests
-Integration tests use a dynamic environment with a lot of dependencies where any of them can work unstable from time to time. As a result, integration tests become red randomly and make them undetermined. It spoils all testing process.
+### Retries failed tests
+Integration tests use a dynamic environment with a lot of dependencies, where any of them could be unstable from time to time. As a result, integration tests turn red randomly, which makes them imprecise. This spoils the entire testing process.
-To prevent incidental fails `hermione` retries a failed test before marking it as a failed. It makes it possible to get rid of a majority of incidental fails. Number of retries can be specified for all browsers or for a specific browser.
+To prevent incidental fails, `hermione` retries a failed test before marking it as failed. This makes it possible to get rid of a majority of incidental fails. The number of retries can be specified for all browsers or for a specific browser.
-:warning: `Hermione` reruns tests in a new browser session to exclude situations when the browser environment is a cause of the fail.
+:warning: `Hermione` reruns tests in a new browser session to exclude situations when the browser environment is the cause of the failure.
-### Executing a separate test
-Sometimes it is needed to run only specific tests but not all tests in a set. `Hermione` makes it possible. You can specify path to the test file
+### Executes separate tests
+Sometimes you only need to run specific tests, not all the tests in a set. `Hermione` makes this possible. You can specify the path to the test file
```
hermione tests/func/mytest.js
```
-or filter describes by using `--grep` option
+or filter describes by using the `--grep` option
```
hermione --grep login
```
-or simply use `mocha` `only()` API in the test
+or simply use the `mocha` `only()` API in the test
```
describe.only('user login', function() {...});
```
-### Skip tests in specific browsers
-Sometimes you need to skip test not in all browsers but in a specific one. For example, you don't need to run
-some test in ~~ugly~~ IE browsers. In `hermione` you can do it with [hermione helper](#skip). For example,
-you can skip some tests in the specific browser
+### Skips tests in specific browsers
+Sometimes you need to skip a test just in a specific browser, not in all browsers. For example, you don't need to run
+some test in ~~ugly~~ IE browsers. In `hermione` you can do this with [hermione helper](#skip). For example,
+you can skip some tests in a specific browser
```js
describe('feature', function() {
- hermione.skip.in('ie8', 'it can not work in this browser');
+ hermione.skip.in('ie8', 'it cannot work in this browser');
it('nowaday functionality', function() {...});
});
```
-or run tests in one of the browsers
+or run tests in just one browser
```js
describe('feature', function() {
- // will be skipped in all browsers except chrome
+ // will be skipped in all browsers except Chrome
hermione.skip.notIn('chrome', 'it should work only in Chrome');
it('specific functionality', function() {...});
});
```
-In these cases you will see messages with a skip reason in reports.
+In these cases you will see messages in reports with the reason for skipping.
-To skip suite or test silently (without any messages in reports), you can pass the third argument with silent flag:
+To skip a suite or test silently (without any messages in reports), you can pass the third argument with the silent flag:
```js
hermione.skip.in('ie8', 'skipReason', {silent: true});
// or
hermione.skip.notIn('chrome', 'skipReason', {silent: true});
```
-Or you can use another hermione helper - [only](#only), which is silent by default:
+Or you can use another hermione helper, [only](#only), which is silent by default:
```js
hermione.only.in('chrome');
```
-It will run tests only in one browser and skip rest silently.
+It will run tests only in one browser and skip the rest silently.
-### Flexible tests configuration
-`Hermione` has possibility to configure running some set of tests in specific browsers. For example,
+### Offers flexible test configuration
+`Hermione` lets you configure running some set of tests in specific browsers. For example,
```js
sets: {
desktop: {
@@ -146,30 +146,30 @@ sets: {
See [sets](#sets) for more details.
-### Auto initialization and closing grid sessions
-All work with a grid client is incapsulated in hermione. Forget about `client.init` and `client.end` in your tests ;)
+### Automatically initializes and closes grid sessions
+All work with the grid client is encapsulated in hermione. Forget about `client.init` and `client.end` in your tests ;)
## Prerequisites
-Because of `hermione` is based on `WebdriverIO` you need to set up [Selenium](http://www.seleniumhq.org/) before proceed further.
+Because `hermione` is based on `WebdriverIO`, you need to set up [Selenium](http://www.seleniumhq.org/) before proceeding further.
-The simplest way to get started is to use one of the NPM selenium standalone packages like: [vvo/selenium-standalone](https://github.com/vvo/selenium-standalone). After installing it (globally) you can run your server by executing:
+The simplest way to get started is to use one of the NPM selenium standalone packages, such as [vvo/selenium-standalone](https://github.com/vvo/selenium-standalone). After installing it (globally), you can run your server by executing:
```
selenium-standalone start
```
## Skip
-This feature allows you to ignore the specified suite or test in any browser with additional comment.
-You can do it by using global `hermione.skip` helper. It supports the following methods:
+This feature allows you to ignore the specified suite or test in any browser, with an additional comment.
+You can do this by using the global `hermione.skip` helper. It supports the following methods:
- - `.in` — adds matchers for browsers with additional comment;
- - `.notIn` — `.in` method with reverted value;
+ - `.in` – Adds matchers for browsers with the additional comment.
+ - `.notIn` – `.in` method with the reverted value.
-Each of these methods takes following arguments:
- - browser {String|RegExp|Array} — matcher for browser(s) to skip;
- - [comment] {String} — comment for skipped test;
- - [options] {Object} - additional options;
+Each of these methods takes the following arguments:
+ - browser {String|RegExp|Array} – Matcher for browser(s) to skip.
+ - [comment] {String} – Comment for skipped test.
+ - [options] {Object} – Additional options.
-**Note that matchers will be compared with `browserId` specified in a config file, e.g. `chrome-desktop`.**
+**Note that matchers will be compared with `browserId` specified in the config file, e.g. `chrome-desktop`.**
For example,
```js
@@ -184,13 +184,13 @@ describe('feature', function() {
});
hermione.skip.in(['chrome', 'firefox', /ie\d*/], 'Unstable test, see ticket TEST-487');
- it('should done some tricky things', function() {
+ it('should have done some tricky things', function() {
return runTrickyTest();
});
});
```
-in this case behaviour `it should work this way` will be skipped only in `chrome` browser, but will be run in other browsers. `It should work that way` will not be ignored. So skip will be applied only to the nearest test. If you need to skip all tests within a suite you can apply `skip` helper to a `describe` - all tests within this suite will be skipped with the same comment.
+In this case, the behaviour `it should work this way` will be skipped only in `chrome` browser, but will be run in other browsers. `It should work that way` will not be ignored. So only the nearest test will be skipped. If you need to skip all tests within a suite, you can apply the `skip` helper to a `describe` so all tests within this suite will be skipped with the same comment.
```js
hermione.skip.in('chrome', 'skip comment');
describe('some feature', function() {
@@ -199,7 +199,7 @@ describe('some feature', function() {
});
```
-Also you can use `.notIn` method to invert matching. For example,
+You can also use the `.notIn` method to invert matching. For example,
```js
// ...
hermione.skip.notIn('chrome', 'some comment');
@@ -209,9 +209,9 @@ it('should work this way', function() {
// ...
```
-in this case test will be skipped in all browsers except `chrome`.
+In this case, the test will be skipped in all browsers except `chrome`.
-All of these methods are chainable. So you can skip test in several browsers with different comments. For example,
+All of these methods are chainable, so you can skip a test in several browsers with different comments. For example,
```js
// ...
hermione.skip
@@ -223,16 +223,16 @@ it('test1', function() {
// ...
```
-If you need to skip test in all browsers without a comment you can use [mocha `.skip` method](http://mochajs.org/#inclusive-tests) instead of `hermione.skip.in(/.*/);`. The result will be the same.
+If you need to skip a test in all browsers without a comment, you can use [mocha `.skip` method](http://mochajs.org/#inclusive-tests) instead of `hermione.skip.in(/.*/);`. The result will be the same.
## Only
This feature allows you to ignore the specified suite or test in any browser silently (without any messages in reports).
-You can do it by using global `hermione.only` helper. It supports only one method:
+You can do this by using the global `hermione.only` helper. It supports only one method:
-- `.in` — `hermione.skip.notIn` method with silent flag
+- `.in` — The `hermione.skip.notIn` method with the silent flag.
-This method takes following arguments:
- - browser {String|RegExp|Array} — matcher for browser(s) to skip;
+This method takes the following arguments:
+ - browser {String|RegExp|Array} — A matcher for browser(s) to skip.
For example:
```js
@@ -244,19 +244,19 @@ it('should work this way', function() {
// ...
```
-in this case test will be skipped in all browsers **silently** except `chrome`.
+In this case, the test will be skipped in all browsers **silently**, except in `chrome`.
## WebdriverIO extensions
-`Hermione` adds some usefull methods and properties to the `webdriverio` session after its initialization.
+`Hermione` adds some useful methods and properties to the `webdriverio` session after its initialization.
### Sharable meta info
Implemented via two commands:
* setMeta(key, value)
* getMeta(key)
-These methods allow to store some information between webdriver calls so it can be used in custom commands for example. This meta information will be shown in [allure report](https://github.com/gemini-testing/hermione-allure-reporter).
+These methods allow you to store some information between webdriver calls and it can then be used in custom commands, for instance. This meta information will be shown in the [allure report](https://github.com/gemini-testing/hermione-allure-reporter).
-**Note**: hermione saves in meta info last url opened in browser.
+**Note**: hermione saves the last URL opened in the browser in meta info.
Example:
```js
@@ -272,7 +272,7 @@ it('test1', function() {
```
### Execution context
-Execution context can be accessed by `browser.executionContext` property which contains current test/hook mocha object extended with browser id.
+The execution context can be accessed by the `browser.executionContext` property, which contains the current test/hook mocha object extended with the browser id.
Example:
```js
@@ -354,7 +354,7 @@ hermione
```
## .hermione.conf.js
-`hermione` is tuned using a configuration file. By default `.hermione.conf.js` is used but a path to the configuration file can be specified using `--conf` option.
+`hermione` is tuned using a configuration file. By default, it uses `.hermione.conf.js`, but you can use the `--conf` option to specify a path to the configuration file.
There is only one required field – `browsers`.
```javascript
@@ -370,33 +370,33 @@ module.exports = {
```
### sets
-You can bind some set of tests with certain browsers using sets.
+You can use sets to bind some set of tests to certain browsers.
Format of the sets section:
```javascript
sets: {
common: { // run tests associated with this path in all browsers
- files: 'tests/common' // which are configured in option `browsers`
+ files: 'tests/common' // which are configured in the `browsers` option
},
desktop: {
files: [
'tests/desktop/*.hermione.js',
'tests/common/*.hermione.js'
]
- browsers: ['browser'] // run tests which match the specified masks in the browser with id `browser`
+ browsers: ['browser'] // run tests which match the specified masks in the browser with the `browser` id
}
}
```
-* `files` - list of test files or directories with test files. Can be a string if you want to specify just one file or directory. Also, you can use
+* `files` – A list of test files or directories with test files. This can be a string if you want to specify just one file or directory. Also, you can use
masks for this property.
-* `browsers` - list of browser ids to run tests specified in `files`. All browsers by default.
+* `browsers` – A list of browser IDs to run the tests specified in `files`. All browsers by default.
-You can specify sets to run using CLI option `--set`.
+You can specify sets to run using the CLI option `--set`.
-If sets are not specified in config and paths were not passed from cli, all files from `hermione`
-directory will be launched in all browsers specified in config.
+If sets are not specified in the config and paths were not passed from CLI, all files from the `hermione`
+directory are launched in all browsers specified in the config.
Running tests using sets:
@@ -405,9 +405,9 @@ Running tests using sets:
```
### browsers
-**Required.** The list of browsers which should be used for running tests.
+**Required.** The list of browsers to use for running tests.
-Browser section has the following format
+The browser section has the following format
```javascript
browsers: {
: {
@@ -416,37 +416,37 @@ browsers: {
}
}
```
-`` values is used for browser identification.
+`` value is used for browser identification.
Available browser options:
Option name | Description
------------------------- | -------------
`desiredCapabilities` | **Required.** Used WebDriver [DesiredCapabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
-`gridUrl` | Selenium grid Url. Default value is `http://localhost:4444/wd/hub`.
-`baseUrl` | Base service-under-test url. Default value is `http://localhost`.
+`gridUrl` | Selenium grid URL. Default value is `http://localhost:4444/wd/hub`.
+`baseUrl` | Base service-under-test URL. Default value is `http://localhost`.
`waitTimeout` | Timeout for web page event. Default value is `1000` ms.
`httpTimeout` | Timeout for any requests to Selenium server. Default value is `90000` ms.
-`sessionRequestTimeout` | Timeout for getting of a browser session. Default value is `httpTimeout`.
-`sessionQuitTimeout` | Timeout for session quit. Default value is `httpTimeout`.
+`sessionRequestTimeout` | Timeout for getting a browser session. Default value is `httpTimeout`.
+`sessionQuitTimeout` | Timeout for quitting a session. Default value is `httpTimeout`.
`sessionsPerBrowser` | Number of sessions which are run simultaneously. Default value is `1`.
-`retry` | How many times test should be rerun. Default value is `0`.
-`screenshotPath` | Directory to save screenshots by webdriverio. Default value is `null`.
+`retry` | How many times a test should be rerun. Default value is `0`.
+`screenshotPath` | Directory to save screenshots by Webdriverio. Default value is `null`.
### gridUrl
Selenium grid URL. Default value is `http://localhost:4444/wd/hub`.
### baseUrl
-Base service-under-test url. Default value is `http://localhost`.
+Base service-under-test URL. Default value is `http://localhost`.
### httpTimeout
Timeout for any requests to Selenium server. Default value is `90000` ms.
### sessionRequestTimeout
-Timeout for getting of a browser session. Default value is `httpTimeout`.
+Timeout for getting a browser session. Default value is `httpTimeout`.
### sessionQuitTimeout
-Timeout for session quit. Default value is `httpTimeout`.
+Timeout for quitting a session. Default value is `httpTimeout`.
### waitTimeout
Timeout for web page events. Default value is `1000` ms.
@@ -455,7 +455,7 @@ Timeout for web page events. Default value is `1000` ms.
Number of sessions which are run simultaneously. Global value for all browsers. Default value is `1`.
### retry
-How many times test should be retried in case of a fail. Global value for all browsers. Default value is `0`.
+How many times a test should be retried if it fails. Global value for all browsers. Default value is `0`.
### system
@@ -466,7 +466,7 @@ Turn webdriver debug mode on. Default value is `false`.
Extra options for `mocha` which are passed to `mocha.setup`. See [Mocha](https://mochajs.org/) documentation for the list of options. Default values are:
```javascript
mochaOpts: {
- slow: 10000, // If test execution time is greater than this value, then test is slow.
+ slow: 10000, // If test execution time is greater than this value, then the test is slow.
timeout: 60000 // timeout for test execution.
}
```
@@ -488,19 +488,19 @@ it('awesome test', function() {
**Recommendation**: use `ctx` in your tests in favor of global variables.
### plugins
-`Hermione` plugins are commonly used to extend built-in possibilities. For example, [hermione-allure-reporter](https://github.com/gemini-testing/hermione-allure-reporter) and [hermione-tunnel](https://github.com/gemini-testing/hermione-tunnel).
+`Hermione` plugins are commonly used to extend built-in functionality. For example, [hermione-allure-reporter](https://github.com/gemini-testing/hermione-allure-reporter) and [hermione-tunnel](https://github.com/gemini-testing/hermione-tunnel).
-Plugin is a module which exports a single function. The function has two arguments:
-* hermione instance;
-* plugin options from configuration file.
+A plugin is a module that exports a single function. The function has two arguments:
+* The hermione instance
+* Plugin options from the configuration file
Plugins will be loaded before `hermione` runs tests.
-It's strongly recommended to name `hermione` plugins with `hermione-` prefix. It makes search for user plugins [very simple](https://github.com/search?l=JavaScript&q=hermione-&type=Repositories&utf8=%E2%9C%93).
+It's strongly recommended to name `hermione` plugins with the `hermione-` prefix. This makes searching for user plugins [very simple](https://github.com/search?l=JavaScript&q=hermione-&type=Repositories&utf8=%E2%9C%93).
-If a plugin name starts with `hermione-`, then the prefix can be ommited in the configuration file. If two modules with names `hermione-some-module` and `some-module` are specified, then module with prefix will have higher priority.
+If a plugin name starts with `hermione-`, then the prefix can be ommited in the configuration file. If two modules with names `hermione-some-module` and `some-module` are specified, the module with the prefix will have higher priority.
-For example.
+For example:
```js
// .hermione.conf.js
// ...
@@ -523,47 +523,47 @@ module.exports = function(hermione, opts) {
}
```
-**Properties of `hermione` object**
+**Properties of the `hermione` object**
Property name | Description
------------------------- | -------------
-`config` | Config which is used in test runner. Can be mutated.
-`events` | Events list for subscription
+`config` | Config that is used in the test runner. Can be mutated.
+`events` | Events list for subscription.
**Available events**
Event | Description
------------------------- | -------------
-`RUNNER_START` | Will be triggered before tests execution. If a handler returns a promise, tests will be executed only after promise is resolved. Handler accepts an instance of a runner as a first argument. Using this instance you can emit and subscribe to any other available events.
-`RUNNER_END` | Will be triggered after tests execution. If a handler returns a promise, tests will be executed only after promise is resolved.
-`SESSION_START` | Will be triggered after browser session initialization. If a handler returns a promise, tests will be executed only after promise is resolved. Handler accepts an instance of webdriverIO as a first argument and object with browser identifier as second.
-`SESSION_END` | Will be triggered after browser session quit. If a handler returns a promise, tests will be executed only after promise is resolved. Handler accepts an instance of webdriverIO as a first argument and object with browser identifier as second.
-`SUITE_BEGIN` | Test suite is about to execute
-`SUITE_END` | Test suite execution is finished
-`SUITE_FAIL` | Suite failed. For instance, `before` hook failed or a browser can not be launched (in fact, browsers are launched in `before` hook implicitly in the core of `hermione`)
-`TEST_BEGIN` | Test is about to execute
-`TEST_END` | Test execution is finished
-`TEST_PASS` | Test passed
-`TEST_FAIL` | Test failed
-`TEST_PENDING` | Test is skipped
-`RETRY` | Test failed but went to retry
+`RUNNER_START` | Will be triggered before test execution. If a handler returns a promise, tests will be executed only after the promise is resolved. The handler accepts an instance of a runner as the first argument. You can use this instance to emit and subscribe to any other available events.
+`RUNNER_END` | Will be triggered after test execution. If a handler returns a promise, tests will be executed only after the promise is resolved.
+`SESSION_START` | Will be triggered after browser session initialization. If a handler returns a promise, tests will be executed only after the promise is resolved. The handler accepts an instance of webdriverIO as the first argument and an object with a browser identifier as the second.
+`SESSION_END` | Will be triggered after the browser session ends. If a handler returns a promise, tests will be executed only after the promise is resolved. The handler accepts an instance of webdriverIO as the first argument and an object with a browser identifier as the second.
+`SUITE_BEGIN` | Test suite is about to execute.
+`SUITE_END` | Test suite execution is finished.
+`SUITE_FAIL` | Suite failed. For instance, the `before` hook failed or a browser cannot be launched (in fact, browsers are launched in `before` hook implicitly in the core of `hermione`).
+`TEST_BEGIN` | Test is about to execute.
+`TEST_END` | Test execution is finished.
+`TEST_PASS` | Test passed.
+`TEST_FAIL` | Test failed.
+`TEST_PENDING` | Test is skipped.
+`RETRY` | Test failed but went to retry.
`ERROR` | Generic (no tests) errors.
-`INFO` | Reserved
-`WARNING` | Reserved
-`EXIT` | Will be triggered when SIGTERM is received (for example, Ctrl + C). Handler can return a promise.
+`INFO` | Reserved.
+`WARNING` | Reserved.
+`EXIT` | Will be triggered when SIGTERM is received (for example, Ctrl + C). The handler can return a promise.
### prepareBrowser
-Prepare browser session before tests are run. For example, adding custom user commands.
+Prepare the browser session before tests are run. For example, add custom user commands.
```js
prepareBrowser: function(browser) {
// do setup here
}
```
-`browser` argument is a `WebdriverIO` session.
+The `browser` argument is a `WebdriverIO` session.
### prepareEnvironment
-Configuration data can be changed depending on extra conditions in `prepareEnvironment` function.
+Configuration data can be changed depending on extra conditions in the `prepareEnvironment` function.
## CLI
```
@@ -589,27 +589,27 @@ hermione --config ./config.js --reporter flat --browser firefox --grep name
All options can also be overridden via command-line flags or environment variables. Priorities are the following:
-* command-line option has the highest priority. It overrides environment variable and config file value.
+* A command-line option has the highest priority. It overrides the environment variable and config file value.
-* environment variable has second priority. It overrides config file value.
+* An environment variable has second priority. It overrides the config file value.
-* config file value has the lowest priority.
+* A config file value has the lowest priority.
-* if no command-line option, environment variable or config file option specified, default is used.
+* If there isn't a command-line option, environment variable or config file option specified, the default is used.
-To override config setting with CLI option, convert full option path to `--kebab-case`. For example, if you want to run tests against different base URL, call:
+To override a config setting with a CLI option, convert the full option path to `--kebab-case`. For example, if you want to run tests against a different base URL, call:
```
hermione path/to/mytest.js --base-url http://example.com
```
-To change number of sessions for Firefox (considering you have browser with `firefox` id in the config):
+To change the number of sessions for Firefox (assuming you have a browser with the `firefox` id in the config):
```
hermione path/to/mytest.js --browsers-firefox-sessions-per-browser 7
```
-To override setting with environment variable, convert its full path to `snake_case` and add `hermione_` prefix. Above examples can be rewritten to use environment variables instead of CLI options:
+To override a setting with an environment variable, convert its full path to `snake_case` and add the `hermione_` prefix. The above examples can be rewritten to use environment variables instead of CLI options:
```
hermione_base_url=http://example.com hermione path/to/mytest.js
@@ -618,7 +618,7 @@ hermione_browsers_firefox_sessions_per_browser=7 hermione path/to/mytest.js
## Programmatic API
-With the help of API you can use Hermione programmatically in your scripts or build tools.
+With the API, you can use Hermione programmatically in your scripts or build tools.
```js
const Hermione = require('hermione');
@@ -626,10 +626,10 @@ const Hermione = require('hermione');
const hermione = new Hermione(config, allowOverrides);
```
-* **config** (required) `String|Object` - path to configuration file which will be read relatively to `process.cwd` or [configuration object](#hermioneconfjs).
-* **allowOverrides** (optional) `Object` - switch on/off [configuration override](#overriding-settings) via environment variables or cli options:
- * **env** (optional) `Boolean` – switch on/off configuration override via environment variables. Default is `false`
- * **cli** (optional) `Boolean` - switch on/off configuration override via cli options. Default is `false`
+* **config** (required) `String|Object` – Path to the configuration file that will be read relative to `process.cwd` or [configuration object](#hermioneconfjs).
+* **allowOverrides** (optional) `Object` – Switch on/off [configuration override](#overriding-settings) via environment variables or CLI options:
+ * **env** (optional) `Boolean` – Switch on/off configuration override via environment variables. Default is `false`.
+ * **cli** (optional) `Boolean` - Switch on/off configuration override via CLI options. Default is `false`.
### run
@@ -643,11 +643,11 @@ hermione.run(testPaths, options)
.done();
```
-* **testPaths** (optional) `String[]` - paths to tests relatively to `process.cwd`
+* **testPaths** (optional) `String[]` – Paths to tests relative to `process.cwd`.
* **options** (optional) `Object`
- * **reporters** (optional) `String[]` - test result reporters
- * **browsers** (optional) `String[]` - browsers in which to run tests
- * **grep** (optional) `RegExp` - pattern which indicates which tests to run
+ * **reporters** (optional) `String[]` – Test result reporters.
+ * **browsers** (optional) `String[]` – Browsers to run tests in.
+ * **grep** (optional) `RegExp` – Pattern that defines which tests to run.
### readTests
@@ -655,13 +655,13 @@ hermione.run(testPaths, options)
hermione.readTests(testPaths, browsers).done();
```
-* **testPaths** (required) `String[]` - paths to tests relatively to `process.cwd`
-* **browsers** (optional) `String[]` - read tests only for specified browsers
+* **testPaths** (required) `String[]` – Paths to tests relative to `process.cwd`.
+* **browsers** (optional) `String[]` – Read tests only for the specified browsers.
## Environment variables
### HERMIONE_SKIP_BROWSERS
-Skip browsers specified in a config by passing browser ids. Several browser ids should be split by commas
+Skip the browsers specified in the config by passing the browser IDs. Multiple browser IDs should be separated by commas
(spaces after commas are allowed).
For example,