One of the really cool features of gwen-web is the ability to load in different parameters at run time. This allows you to run gwen-web against multiple environments without changing either the feature or the meta files.
Lets take one of the examples with gwen-web and flood.io Below are two examples of how one could set the value. The first example sets “the how old are you dropdown” to 21, the second example uses a property, in this case different files for two different environments to set the value.
Lets define how the dropdown can be found in the meta first.
Now with the properties approach. Lets create two files, DEV.properties and SIT.properties. The contents of the two files are below:
In addition we need to make a small modification to both the feature and the meta files
Now replace the strikethrough line with the new line in the feature
Editting is complete. To run gwen-web with the environment specific age, simply type “gwen-web features/floodio/ -p dev.properties -b -r devReport”, or alternatively you can run “gwen-web features/floodio/ -p sit.properties -b -r sitReport”.