Skip to content

Commit e0db2b7

Browse files
Lee EggebrotenJohn Doherty
authored andcommitted
Per issue #27, update readme to document usage of default configuration file.
1 parent 2c551bb commit e0db2b7

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.MD

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,34 @@ By default tests are run using Google Chrome, to run tests using another browser
6161
| Firefox | `-b firefox`
6262
| Phantom JS | `-b phantomjs`
6363

64+
### Default configuration file
65+
Many configuration options can be defaulted so they don't need to be overridden on the command line.
66+
67+
Create a "selenium-cucumber-js.json" file at the root of your project and add your configuration overrides.
68+
For example the following duplicates the current configuration defaults.
69+
70+
```json
71+
{
72+
step_def_dir: './step-definitions',
73+
page_obj_dir: './page-objects',
74+
shared_obj_dir: './shared-objects',
75+
reports_dir: './reports',
76+
default_browser: 'chrome',
77+
timeout: 10000
78+
}
79+
```
80+
This would set configuration to match the expected directory structure of IntelliJ's Cucumber plugin, and make default timeout one minute.
81+
```json
82+
{
83+
step_def_dir: './features/step_definitions',
84+
page_obj_dir: './features/page_objects',
85+
shared_obj_dir: './features/shared_objects',
86+
reports_dir: './features/reports',
87+
timeout: 60000
88+
}
89+
```
90+
91+
6492
### Feature files
6593

6694
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.
@@ -338,4 +366,4 @@ node ./node_modules/selenium-cucumber-js/index.js -s ./features/step_definitions
338366

339367
## License
340368

341-
Licensed under [ISC License](LICENSE) © [John Doherty](http://www.johndoherty.info)
369+
Licensed under [ISC License](LICENSE) © [John Doherty](http://www.johndoherty.info)

0 commit comments

Comments
 (0)