global-config.xml

global config file structure

global-config.xml - is a file which will contain the main configuration settings of your project. You have the ability to create multiple configuration files and divide the testing environment.

No, you can give it any name you like. But we provide an example of how to name this file for convenience!

For example:

  • global-config-local.xml
  • global-config-dev.xml
  • global-config-jenkins.xml

global-config.xml - is a XSD schema of which has an optional set of commands out-of-the-box, which extremely simplifies the settings configuration process.

The default set of basic commands for configuration global-config.xml:

XML
Copy

The example of completed global-config.xml:

XML
Copy

parallelExecution

<parallelExecution> - is a command for enabling or disabling parallel execution of test scenarios.

XML
Copy

Contains flags:

true - Enables parallel execution of test scenarios, if environments are set up.

false - Disables parallel execution of test scenarios.

stopScenarioOnFailure

<stopScenarioOnFailure> - is a command that controls the passage of your test scenarios.

XML
Copy

Contains flags:

true - When starting several or one test scenario, and detecting an error (bug) then the scenario will be stopped on this step.

false - when running several or one test scenario, and an exception is detected, the starter will not be stopped, all the scenarios and steps will be executed until the starter finishes working, with further logs for all steps during the scenario.

stopIfInvalidScenario

<stopIfInvalidScenario> - is a command that controls the validity of your test scenarios.

XML
Copy

true - When starting several or one test scenario, and detecting an invalid test scenario in test resources, the start will be terminated with an error output, which will show the path to an invalid scenario.

false - when running several or one test scenario, and an exception is detected, the starter will not be stopped, all the scenarios and steps will be executed until the starter finishes working, except the invalid scenario.

delayBetweenScenariosRuns

<delayBetweenScenariosRuns> - is a command, that adds a timeout between script executions.

XML
Copy

Contains attributes:

seconds - Sets the time counter between the script timeout.

true - When selected, the ability to perform a timeout between scenarios is enabled.

false - When selected, the ability to perform a timeout between scenarios is disabled.

runScenariosByTag

<runScenariosByTag> - allows you to be able to implement a global launch of test scenarios for a specific command. It is designed to separate the launch of test scenarios.

  • Create your own FilterTag for your convenience.
  • Set a unique tag for each scenario.
XML
Copy

When configuring <runScenariosByTag> - you have the ability to create your own set of tags and give them names that will be used to separate and run test scenarios by tag.

Contains attributes:

enable="true" - When selected, the ability to run scenarios by all or specific tags is enabled.

enable="false" - When selected, the ability to run scenarios by all or specific tags is disabled.

name - allows to come up with and specify, which exactly tag user wants to run.

report

<report> - configuring local and server reporting.

XML
Copy

Contains attributes:

<extentReports projectName="shop"> - is to specify project name for reports.

<htmlReportGenerator enable="true"/> - enables or disables creating of local reports, that will be saved in report folder inside your test resources.

<klovServerReportGenerator enable="true"> - enables or disables creating of remote reports, that will be saved on remote server.

<mongoDB host="localhost" port="27017"/> - allows to specify host and port for storing remote reports.

environments

<environments> - is a command, that allows to set up several environments for parallel test execution.

XML
Copy

Contains attributes:

folder - is to specify folder name with integration.xml and ui.xml files for specific environment.

enabled - is used to enable or disable specific environment.

threads - (optional): execution allow to run tests concurrently, however, in the case of tests that affect each other, the tests will fail because the same environment (default value - 1).

vault

<vault> - is a command, for interaction with the Volt service, and creation of variables for configurations. It offers features for secret storage, dynamic secret generation, authentication.

XML
Copy

host - host for vault URL

port - port for vault URL

scheme - scheme for vault URL (For example - http, https)

token - token for vault account

NOTE: Data for variables from vault, you can write in ui and integration files to any field with the format - {{path_to_vault_variable}}.

Example with vault variable:

XML
Copy

system env variable

NOTE: It is also possible to write a variable in the config from personal computer, in ui and integration files to any field with the format - ${PC_variable_name}.

Example with personal computer variable:

XML
Copy

If these are new variables then restart your development environment tool before running the tests (because the development environment tool needs to get new up-to-date data from PC variables).

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard