Skip to content

Commit 1d25a05

Browse files
author
Mikhail Podtserkovskiy
committed
fix
1 parent be0f7b0 commit 1d25a05

File tree

1 file changed

+75
-33
lines changed

1 file changed

+75
-33
lines changed

README.md

Lines changed: 75 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ~~jsonwire-grid~~WebDriverGrid [![Build Status](https://travis-ci.org/qa-dev/jsonwire-grid.svg?branch=master)](https://travis-ci.org/qa-dev/jsonwire-grid)
22
This is high-performance scalable implementation of Selenium Grid (hub),
3-
> ######What is Selenium-Grid?
3+
###### What is Selenium-Grid?
44
>Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a distributed test execution environment.
55
66
## Features
@@ -31,47 +31,89 @@ This is high-performance scalable implementation of Selenium Grid (hub),
3131

3232

3333
## Configuration
34+
Configurations are stored in json files. Example:
35+
```
36+
{
37+
"logger": {
38+
"level": "debug"
39+
},
40+
"db": {
41+
"implementation": "local"
42+
},
43+
"grid": {
44+
"client_type": "selenium",
45+
"port": 4444,
46+
"strategy_list": [
47+
{
48+
"type": "persistent"
49+
}
50+
],
51+
"busy_node_duration": "15m",
52+
"reserved_node_duration": "5m"
53+
}
54+
}
55+
```
56+
3457
### Logger - Configuration of logger.
35-
##### `logger.level` - Support `debug`, `info`, `warning` or `error`.
58+
| Option | Possible values | Description |
59+
| ------------- | ----------------------------------- | ---------------------- |
60+
| logger.level | `debug`, `info`, `warning`, `error` | Logging level. |
3661

3762
### DB - Configuration of storage.
38-
##### `db.implementation` - Select your favorite db, or local storage.
39-
Now support's: `mysql`, `local`.
63+
| Option | Possible values | Description |
64+
| ----------------- | --------------- | ------------------------------------------ |
65+
| db.implementation | `mysql`, `local` | Select your favorite db, or local storage. |
66+
| db.connection | see next table | DSN for your db. |
67+
4068
>Note: Note: Local (in-memory) storage does not support common session storage between grid-instances.
41-
##### `db.connection` - DSN for your db
42-
* `mysql` - example `db_user:db_pass@(db_host:3306)/db_name?parseTime=true` (parseTime=true - required option)
43-
* `local` - omit this property, because every instance have its own in-memory storage
69+
70+
| DB implementation | DSN format |
71+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72+
| mysql | [spec](https://github.com/go-sql-driver/mysql#dsn-data-source-name), example `db_user:db_pass@(db_host:3306)/db_name?parseTime=true` (parseTime=true - required option) |
73+
| local | omit this property, because every instance have its own in-memory storage |
4474

4575
### Statsd - Configuration of metrics.
46-
##### `statsd.host` - Host of statsd server.
47-
##### `statsd.port` - Host of statsd server `int`.
48-
##### `statsd.protocol` - Network protocol.
49-
##### `statsd.prefix` - Prefix of metrics tag.
50-
##### `statsd.enable` - Enable metrics `true/false`.
76+
| Option | Possible values | Description |
77+
| --------------- | --------------- | ---------------------- |
78+
| statsd.host | `string` | Host of statsd server. |
79+
| statsd.port | `int` | Port of statsd server. |
80+
| statsd.protocol | `string` | Network protocol. |
81+
| statsd.prefix | `string` | Prefix of metrics tag. |
82+
| statsd.enable | `bool` | Enable metric. |
5183

5284
### Grid - Configuration of app.
53-
##### `grid.client_type` - Type of used nodes.
54-
* `selenium` - [http://www.seleniumhq.org/]()
55-
* `wda` - [agent](https://github.com/qa-dev/WebDriverAgent) for [WDA](https://github.com/qa-dev/WebDriverAgent)
56-
##### `grid.port` - grid will run on this port.
57-
##### `grid.busy_node_duration` - max session lifetime, when timeout was elapsed grid will kill the session.
58-
##### `grid.reserved_node_duration` - max timeout between send request `POST /session` and opening the browser window. (Deprecated will renamed)
59-
##### `grid.strategy_list` - list of strategies, if grid not able create session on first strategy it go to next, until list ends. [Read more about strategies.](#strategy-list)
60-
61-
### Strategy list
62-
##### `type` - [type of strategy.](#types-of-strategies)
63-
##### `limit` - max count of active nodes on this strategy. Unlimited if equals `0`. Dependent on strategy [type](#types-of-strategies)
64-
##### `params` - object describes available nodes `ex. docker config, kubernetes config, etc.`. Dependent on strategy [type](#types-of-strategies)
65-
##### `node_list` - list of objects describing available nodes.
66-
##### `node_list.[].params` - list of objects describing available nodes `ex. image_name, etc.`. Dependent on strategy [type](#types-of-strategies)
67-
##### `node_list.[].capabilities_list` - array of available capabilities objects. `ex. [{"foo: "bar"}, {"foo: "baz", "ololo": "trololo"}]`
85+
| Option | Possible values | Description |
86+
| --------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87+
| grid.client_type | `selenium`, `wda` | Type of used nodes. |
88+
| grid.port | `int` | Grid will run on this port. |
89+
| grid.busy_node_duration | `string` as `12m`, `60s` | Max session lifetime, when timeout was elapsed grid will kill the session. |
90+
| grid.reserved_node_duration | `string` as `12m`, `60s` | Max timeout between send request `POST /session` and opening the browser window. (Deprecated will renamed) |
91+
| grid.strategy_list | `array` | List of strategies, if grid not able create session on first strategy it go to next, until list ends. [Read more about strategies.](#element-of-strategy-list) |
92+
93+
> * `selenium` - [http://www.seleniumhq.org/]()
94+
> * `wda` - [agent](https://github.com/qa-dev/WebDriverAgent) for [WDA](https://github.com/qa-dev/WebDriverAgent)
95+
96+
### Element of strategy list
97+
| Option | Possible values | Description |
98+
| ------------------------------ | --------------------------------------------------------------- | ---------------------------------------------------------------------------- |
99+
| type | `string`, see [type of strategy.](#types-of-strategy) | Host of statsd server. |
100+
| limit | `int`, unlimited if equals `0` | Max count of active nodes on this strategy. |
101+
| params | `object`, dependent on [strategy type](#types-of-strategy) | Object describes available nodes, ex. docker config, kubernetes config, etc. |
102+
| node_list | `array`, dependent on [strategy type](#types-of-strategy) | Array of objects describing available nodes. |
103+
| node_list.[].params | `object`, dependent on [strategy type](#types-of-strategy) | Object of describing node, ex. image_name, etc. |
104+
| node_list.[].capabilities_list | `array`, ex. [{"foo: "bar"}, {"foo: "baz", "ololo": "trololo"}] | array of objects describes available capabilities . |
68105

69106
### Types of strategy
70107
##### `persistent` - using externally started nodes, same as original selenium grid.
71-
* `limit` - omit this property, its always equals `0`.
72-
* `node_list` - omit this property.
73-
##### `kubernetes` - on-demand nodes in kubernetes cluster.
74-
* `params` - omit this property.
75-
* `node_list.[].params.image` - docker image with selenium.
76-
* `node_list.[].params.port` - port of selenium.
108+
| Strategy option | Possible values | Description |
109+
|---------------- | --------------- | ---------------------------------------------------- |
110+
| limit | - | Omit this property, сount of nodes always unlimited. |
111+
| params | - | Omit this property. |
112+
| node_list | - | Omit this property. |
77113

114+
##### `kubernetes` - on-demand nodes in kubernetes cluster.
115+
| Strategy option | Possible values | Description |
116+
|-------------------------- | --------------- | --------------------------- |
117+
| params | - | Omit this property. |
118+
| node_list.[].params.image | - | Docker image with selenium. |
119+
| node_list.[].params.port | - | Port of selenium. |

0 commit comments

Comments
 (0)