Variable Set Syntax
Provar Application Run-Time Configuration and Overrides
Overview
This page and sub-section catalogues the set of run-time configuration settings and the options available to override these using either a system environment variable or command line argument.
Note: it is currently a work-in-progress to catalogue all existing configuration settings and their overrides. All new ones will be added going forward, and a project is underway to document all of the existing ones.
Order of Precedence
In all cases, the following order of precedence is used when a single configuration property is set by more than one available method:
1. Command line switch
2. System environment variable
3. Provar global variable
4. Basic configuration method (e.g. via UI), typically stored in configuration files within a project
Note: not all settings will offer all three methods of configuration. For example, some may offer only basic configuration, some may offer only one method of override. Where override configuration methods are available, these will be detailed in the configuration setting tables. An empty cell for the environment variable or command line switch overrides indicates that this is not currently supported (and not allowed by the user).
Configuration Settings and Overrides
Definitions
Description | A brief explanation of the purpose of the configuration setting |
Data Classification | Classification of the data: – Clear – data can be held in clear text and can be recorded in logs – Secret – data held in files must be encrypted and must be omitted from or masked in logs |
Basic Configuration Method | The standard method by which a user would configure the setting. This may typically be some part within the UI. |
Global Variable | A global variable to override the basic configuration method within a Test Step by add a variable in the Variables Tab within Provar Studio. If there is no global variable stated, then it is not possible to override this configuration property using the global variable. |
Environment Variable | An environment variable to override the basic configuration/global variable method. If there is no environment variable then it is not possible to override the configuration property via environment variable. If there are older, deprecated, environment variables for this same configuration property, those will be listed and marked as deprecated. |
Command Line Property | A command line switch to override the basic configuration method (and any environment variable). If there is no command line switch stated, then it is not possible to override this configuration property using the command line. |
Notes | Any additional notes which may be of importance. |
Naming Principles
- Environment variables will all be prefixed with ‘PROVAR_’
- Command line properties will all be prefixed with ‘com.provar.’
- Global variables will all be prefixed with ‘provar.’
- In general, the names of override variables, where an override variable is supported, will be chosen to match what is in the UI already, whether that is explicitly fields in the UI, Provar variables, or something else. (Note that the stored property names in files, as the raw data, don’t form part of the user interface and are thus a technical implementation decision.)
- Likewise, the command line property names, where an override is supported, will be usually chosen to match the UI.
- However, it cannot be assumed that the names will always match; the right is reserved to have the names not directly matching in circumstances where there is a reason to deviate. I.e. it cannot be guaranteed that the name of, say, a command line override can be predicted from its sibling environment variable, and vice versa.
- Wherever possible, the same names should be used consistently across Provar. For example User Names should be consistently coded as USERNAME/username.
- The URLs that are used to store connection properties in Test Projects should use the same naming used in the Environment Variables and Properties. For example User Names should be encoded as username=xxxx.
- Given the wide range of types of potential run-time properties, e.g. everything from wait auto-retry timeouts through to browser type for execution, a prescribed naming format covering all cases will not be predetermined, but sub-conventions will be established as needed.
- In terms of styling, when defining the name of a variable and to ensure consistency, the last part of the variable name which refers to the property being overridden should be a single word in the relevant letter case. For example:
- Command-line arguments (all lowercase): com.provar.chromedriver.dmwclosewindowtimeout
- OS environment variables (all uppercase): PROVAR_CHROMEDRIVER_DMWCLOSEWINDOWTIMEOUT
- Global variables (all lowercase): provar.autoretry.time
- Note: For using connection override properties via command line arguments, the complete property name should be in lowercase, including the connection name (irrespective of the case in the actual connection name).
E.g. if the connection name is JWT, the property should be com.provar.sf.jwt.consumerkey
Backwards Compatibility
Care must be taken to maintain backwards compatibility when naming conventions are changed:
- Historically customers have specified mixed case environment variables for connection passwords (e.g. PROVAR_SF_User1.PASSWORD) and these must continue to work
- Where a connection URL in the Test Project is changed to use more consistent namings (e.g. user=xxxx is changed to username=xxxx) then Test Projects with the old formats must continue to work
Global Overrides
Description | Data Classification | Data Type | Basic Configuration Method | Global Variable | Environment Variable | Command Line Property | Notes |
Auto Retry Time (Seconds) | Clear | Number | Test Step Auto Retry | provar_autoretry_timeout | PROVAR_AUTORETRY_TIMEOUT | com.provar.autoretry.timeout | This variable overrides all Test Steps Auto Retry timeout value. Numeric value expected, whole number, positive value, represents seconds. Warning should appear if other values are used. |
Auto Retry Interval (milliseconds) | Clear | Number | hidden | provar_autoretry_interval | PROVAR_AUTORETRY_INTERVAL | com.provar.autoretry.interval | This variable overrides all Test Steps Auto Retry interval value. If the variable is null, then existing functionality is used i.e. 500ms interval. Numeric value expected, whole number, positive value, represents milliseconds. Warning should appear if other values are used. |
Auto Retry Override | Clear | Options: ENABLE_ALL DISABLE_ALL NONE | Test Step Auto Retry Override | provar_autoretry_override | PROVAR_AUTORETRY_OVERRIDE | com.provar.autoretry.override | This variable overrides default Auto Retry flag for all Test Steps: ENABLE_ALL: enable all test steps DISABLE_ALL: disable all test steps NONE: Do nothing, Test Step Auto Retry flag used. Warning should appear if other values are used. |
Auto Retry
Interval
The interval Auto-Retry tries to perform the required action within the Auto-Retry time period using the interval value to determine how long Provar should wait between attempts.
Connections to Browser Provider Services
Description | Data Classification | Basic Configuration Method | Global Variable | Environment Variable | Command Line Property | Notes |
Browserstack account username | Clear | Browserstack connection – username field | – | PROVAR_BROWSERSTACK_USERNAME | provar.browserstack.username | See note below |
Browserstack account access key | Secret | Browserstack connection – access key field | – | PROVAR_BROWSERSTACK_ACCESSKEY | provar.browserstack.accesskey | See note below |
Browserstack local identifier | Secret | Browserstack connection – capability: browserstack.locali dentifier | – | PROVAR_BROWSERSTACK_LOCALIDENTIFIER | provar.browserstack.localidentifier | Used for running Browserstack in local mode, rather than vendor cloud. See note below |
Note: The Command Line Properties for Browser Stack are non-conformant, but retained for backwards compatibility. A change will be raised in future to add the conformant names as aliases.
Web Service Connections
Description | Data Classification | Basic Configuration Method | Global Variable | Environment Variable | Command Line Property | Notes |
Web service basic authentication connection username | Clear | Web service basic connection – user (sic) field | – | PROVAR_WS_<CONNECTION_NAME>_USERNAME | com.provar.ws.<connection_name>.username | |
Web service basic authentication connection password | Secret | Web service basic connection – password | – | PROVAR_WS_<CONNECTION_NAME>_PASSWORD | com.provar.ws.<connection_name>.password | |
Web service API key authentication key | Secret | Web service API key connection – API key | – | PROVAR_WS_<CONNECTION_NAME>_APIKEY | com.provar.ws.<connection_name>.apikey | |
Web service OAuth client credentials connection – client ID | Clear | Web service OAuth Client Credentials – Client ID | – | PROVAR_WS_<CONNECTION_NAME>_CLIENTID | com.provar.ws.<connection_name>.clientid | |
Web service OAuth client credentials connection – client secret | Secret | Web service OAuth Client Credentials – Client Secret | – | PROVAR_WS_<CONNECTION_NAME>_CLIENTSECRET | com.provar.ws.<connection_name>.clientsecret | |
Web service OAuth client credentials connection – client URL | Clear | Web service OAuth Client Credentials – Client URL | – | PROVAR_WS_<CONNECTION_NAME>_AUTHORIZEURL | com.provar.ws. <connection_name>.authorizeurl | Inconsistent with SF URL which has callback url |
Web service OAuth password authentication connection – Client ID | Clear | Web service OAuth Password Authentication – Client ID | – | PROVAR_WS_<CONNECTION_NAME>_CLIENTID | com.provar.ws.<connection_name>.clientid | |
Web service OAuth password authentication connection – Client Secret | Secret | Web service OAuth Password Authentication – Client Secret | – | PROVAR_WS_<CONNECTION_NAME>_CLIENTSECRET | com.provar.ws.<connection_name>.clientsecret | |
Web service OAuth password authentication connection – Username | Clear | Web service OAuth Password Authentication – User (sic) | – | PROVAR_WS_<CONNECTION_NAME>_USERNAME | com.provar.ws.<connection_name>.username | |
Web service OAuth password authentication connection – Password | Secret | Web service OAuth Password Authentication – Password | – | PROVAR_WS_<CONNECTION_NAME>_PASSWORD | com.provar.ws.<connection_name>.password | |
Web service OAuth password authentication connection – Authorisation URL | Clear | Web service OAuth Password Authentication – Authorisation URL | – | PROVAR_WS_<CONNECTION_NAME>_AUTHORIZEURL | com.provar.ws.<connection_name>.authorizeurl | |
AWS Authentication – Access Key | Secret | AWS connection – Access Key | – | PROVAR_WS_<CONNECTION_NAME>_ACCESSKEY | com.provar.ws.<connection_name>.accesskey | |
AWS Authentication – Secret Key | Secret | AWS connection – Secret Key | – | PROVAR_WS_<CONNECTION_NAME>_SECRETKEY | com.provar.ws.<connection_name>.secretkey | |
AWS Authentication – Region | Clear | AWS connection – AWS Region | – | PROVAR_WS_<CONNECTION_NAME>_AWSREGION | com.provar.ws.<connection_name>.awsregion | |
AWS Authentication – Service Name | Clear | AWS connection – Service Name | – | PROVAR_WS_<CONNECTION_NAME>_SERVICENAME | com.provar.ws.<connection_name>.servicename | |
Web service Certificate Type | Clear | Web service connection certificate type field. | – | PROVAR_WS_<CONNECTION_NAME>_CERTTYPE | com.provar.ws.<connection_name>.certtype | |
Web service Certificate Path | Clear | Web service connection certificate path field. | – | PROVAR_WS_<CONNECTION_NAME>_CERTPATH | com.provar.ws.<connection_name>.certpath | |
Web service Certificate Passphrase | Secret | Web service connection certificate passphrase field. | – | PROVAR_WS_<CONNECTION_NAME>_PASSPHRASE | com.provar.ws.<connection_name>.passphrase |
OAuth JWT Connection
OAuth JWT Connection is only available as a Salesforce connection option, therefore the connection class is SF instead of WS.
If we had a more generic approach to naming variables we could have reused some of the variables already defined under the WS class.
Field | Description | Data Classification | Environment Variable | Command Line Property |
Consumer Key | Connected App Consumer Key | Secret | PROVAR_SF_{CONNECTION_NAME}{_ENV}_CONSUMERKEY | com.provar.sf.{connection_name}{.env}.consumerkey |
Callback URL | Connected App Callback URL | Secret | PROVAR_SF_{CONNECTION_NAME}{_ENV}_CALLBACKURL | com.provar.sf.{connection_name}{.env}.callbackurl |
Private Key/Key Store | Connected App X509 Certificate Private Key / Connected App Java Key Store | Clear | PROVAR_SF_{CONNECTION_NAME}{_ENV}_KEYPATH | com.provar.sf.{connection_name}{.env}.keypath |
Certificate Name | Connected App Java Key Store Certificate Name | Clear | PROVAR_SF_{CONNECTION_NAME}{_ENV}_CERTNAME | com.provar.sf.{connection_name}{.env}.certname |
Key Store Password | Connected App Java Key Store Password | Secret | PROVAR_SF_{CONNECTION_NAME}{_ENV}_KEYSTOREPASSWORD | com.provar.sf.{connection_name}{.env}.keystorepassword |
Username | Salesforce Username | Clear | PROVAR_SF_{CONNECTION_NAME}{_ENV}_USERNAME | com.provar.sf.{connection_name}{.env}.username |