-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration Options
Configuration settings can be defined in several different ways.
Rake command line
> rake spec BROWSER=firefox
Environment variables
> set BROWSER=firefox
The config files config\config.yml
or config\environments.yml
browser: firefox
Options set in the environments.yml
file will be selected based on the ENVIRONMENTS setting (default is TEST).
In the first two cases, you should use all caps for the name of the config option. You should use lower case in the yaml files. Values should always be lower case, regardless of location.
The framework supports these options:
- browser
- environment
See Browser Configuration for more options
What happens if the same configuration setting is defined in more than one location? The locations at the top of this list will trump those listed below them.
- Rake command line settings
- Environment variables
config/config.yml
config/environment.yml
You can define your own options. When you do this, you can set them in either the config\config.yml
or the config\environments.yml
. If set in the environments.yml
file, they will be selected based on the value of ENVIRONMENTS (just like other configuration settings).
You can access any options (including custom options) from your tests. This setting in your environments.yml
username: admin
can be accessed in your scripts:
site.config[:username]