Gwen Settings
Settings Files
All Gwen settings and properties are maintained in settings files in your project.
Formats
The following settings file formats are supported:
- HOCON (Human-Optimized Config Object Notation), since Gwen 3
- The recommended and default format
- A superset of JSON
- Maintained in
.conf
files
- JSON, since Gwen 3
- Pure JSON format
- Maintained in
.json
files
- Properties, since v1.0.0
- Legacy Java properties style format
- Flat
name = value
pairs - Maintained in
.properties
files
Ideally you should use one format for all your settings files, but using combinations of the above is also permitted. Priority will be given in the order shown to same named files in a directory having different formats:
.conf
.json
.properties
Load order and precedence
Settings are loaded in the following order of precedence, with those higher in the list overriding the lower.
- Environment variable overrides
- System properties
- User settings
- A
gwen.conf
,gwen.json
, orgwen.properties
file in your user directory
- A
- Launch settings
- Comma separated list of
*.conf
,*.json
, or*.properies
files passed to the Gwen CLI via the-c|--conf
launch option (or-p|--properties
for Gwen versions prior to v3.0.0). These are loaded in the order given with latter entries overriding the former.
- Comma separated list of
- Project settings
- A
gwen.conf
,gwen.json
orgwen.properties
file in your root project directory
- A
- Default settings
- Internal Gwen defaults
Maintaining settings
-Dname=value
pairs passed to the Gwen CLI as system properties have topmost precedence and will always override ALL other settings.
You can maintain settings and override internal defaults at various levels as described here.
User settings
User-level settings can optionally be defined in a gwen.conf|json|properties
file in the root of your user directory on a machine. These are useful when you want to override certain settings on a machine for a user.
/Users
└── /<username> (~/)
└── gwen.conf # User-level overrides
Launch settings
You can maintain any settings and properties (except CLI options) in your own files and explicitly pass them to Gwen at launch time using the -c|conf
CLI option. For convenience, you would typically store these somewhere within your project where your features
directory lives however you are free to store them in any location you wish.
Project settings
When you set up and initialise your project, all project level settings are stored in a gwen.conf|json|properties
file in the root of the project. Gwen automatically discovers and loads this file for you, so you don't need to explictly pass it to Gwen when you launch in the project directory.
/project # Your project root
└── gwen.conf # Project settings