This functionality is supported only for global configuration file in YAML-format (application.yml)!
If you need to change any property from the YAML global configuration file during testing, you should use tag <configuration> in scenario.xml. Write an appropriate comment and specify as many properties as you need inside the tag. To change property, you need to specify its full path from the highest level and the desired value. The value should have the same type as the property has in global configuration file.
Let's take a look at the following configuration file:
accountManagement: registration: emailRegistrationEnabled: true phoneRegistrationEnabled: true
To change values of emailRegistrationEnabled and phoneRegistrationEnabled properties, you need to specify their full path using dot separation, in our case accountManagement.registration.emailRegistrationEnabled and accountManagement.registration.phoneRegistrationEnabled. So in test scenario it should be the following:
... <configuration comment="Disabling registration via phone, enabling registration via email"> <property path="accountManagement.registration.phoneRegistrationEnabled" value="false"/> <property path="accountManagement.registration.emailRegistrationEnabled" value="true"/> </configuration> ...
You can specify as many properties as you need. Also you can use the tag <configuration> itself as many times as you need.
Also it's required to have stated paths of properties in GlobalConfigurationPathResolver.
How to add required path to GlobalConfigurationPathResolver
To add path which you need to GlobalConfigurationResolver, you should use command for invoking generator which adds appropriate paths to GlobalConfigurationPathResolver:
cmd/run generate cfg-with-resolver
The command above generates GlobalConfigurationPathResolver with ALL properties from global configuration file if it has YAML-format. If you don't need all properties to be included in GlobalConfigurationPathResolver, you can list only required the highest level properties to include. For example, if you has the following configuration file