You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.MD
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ JavaScript browser automation framework using official [selenium-webdriver](http
9
9
*[Installation](#installation)
10
10
*[Usage](#usage)
11
11
*[Options](#options)
12
+
*[Configuration file](#configuration-file)
12
13
*[Feature files](#feature-files)
13
14
*[Step definitions](#step-definitions)
14
15
*[Page objects](#page-objects)
@@ -61,6 +62,33 @@ By default tests are run using Google Chrome, to run tests using another browser
61
62
| Firefox | `-b firefox`
62
63
| Phantom JS | `-b phantomjs`
63
64
65
+
#### Configuration file
66
+
67
+
Configuration options can be set using a `selenium-cucumber-js.json` file at the root of your project. The JSON keys use the "long name" from the command line options. For example the following duplicates default configuration:
68
+
69
+
```json
70
+
{
71
+
"steps": "./step-definitions",
72
+
"pageObjects": "./page-objects",
73
+
"sharedObjects": "./shared-objects",
74
+
"reports": "./reports",
75
+
"browser": "chrome",
76
+
"timeout": 10000
77
+
}
78
+
```
79
+
80
+
Whereas the following would set configuration to match the expected directory structure of IntelliJ's Cucumber plugin, and make default timeout one minute. _Note that the default browser has not been overridden and will remain 'chrome'._
81
+
82
+
```json
83
+
{
84
+
"steps": "./features/step_definitions",
85
+
"pageObjects": "./features/page_objects",
86
+
"sharedObjects": "./features/shared_objects",
87
+
"reports": "./features/reports",
88
+
"timeout": 60000
89
+
}
90
+
```
91
+
64
92
### Feature files
65
93
66
94
A feature file is a [Business Readable, Domain Specific Language](http://martinfowler.com/bliki/BusinessReadableDSL.html) file that lets you describe software’s behavior without detailing how that behavior is implemented. Feature files are written using the [Gherkin syntax](https://github.com/cucumber/cucumber/wiki/Gherkin) and must live in a folder named **features** within the root of your project.
0 commit comments