Major change to support multiple environments without changing the existing code
The releases (3.0.0 and 3.0.1) are a useful running same test scenarios on multiple environments without changing the code when the application behavior is same on different environments (like test, acceptance, pre-production, firefox, chrome, opera, native app, mobile, windows, linux etc.). Just add the environment configuration in test-config/apps-config/<app-name>/environments/ directory and run your testcases by using the mvn command as given below:
mvn verify -Dapps.active.environment=:,:
Also added the following support:
- Added XMLDocumentReader and XMLDocumentValidator classes that can be used to read xml data as string or xml data from file and that data can be validated using XMLDocumentValidator class.
How to migrate from prior version 2.x.x to 3.x.x:
A. Migrate existing configurations present in test-config/* directory as follows
- Create the following directories for each application configuration
test-config/apps-config/<app-name>/api-configs
test-config/apps-config/<app-name>/driver-configs
test-config/apps-config/<app-name>/environments
- For each configured application, move ApiConfig.properties file from test-config/apps-config/ to test-config/apps-config/<app-name>/api-configs directory
- For each configured application, move AppDriver.properties file from test-config/apps-config/<app-name>/ to test-config/apps-config/<app-name>/driver-configs/ directory
- Now if you are interested to create any environment then create environment file like acceptance2.properties (Note this file can overwrite any property present in AppConfig.properties file to create a new environment) under test-config/apps-config/<app-name>/environments directory and the file name acceptance2 can be used as environment file name to run the tests using maven as specified above.