Automatic secret download from Azure Key Vault
If you want to enable this feature, you must set the following properties in your Pumpo5 configuration file:
azure.secrets.replace=true
azure.secrets.prefix="#{"
azure.secrets.suffix="}#"
azure.secrets.keyvault.url="https://vault-uri.vault.azure.net/"
Where azure.secrets.keyvault.url can be found in Azure Portal as Vault URI.
When you enable this, users running tests will need to be authenticated. Authentication can be done using various ways.
We recommend using either Azure CLI with az login
, or with IntelliJ IDEA plugin "Azure Toolkit for IntelliJ"
To use secrets, simply add the secret name in the format #{secret-name}#
to the config file (where #{ and }# are equal to what you set as prefix and suffix).
Config will replace the secret on the fly with the actual value from Azure Key Vault.
For example, you config.conf
website.password="#{website-password}#"
azure.secrets.replace=true
azure.secrets.prefix="#{"
azure.secrets.suffix="}#"
azure.secrets.keyvault.url="https://vault-uri.vault.azure.net/"
And in your test, you can use the secret
@Test
public void websiteTest(Firefox0 webApplication) {
var password = webApplication.getConfig().get("website.password"); // password is downloaded from azure key vault
// ... rest of the test