Masking Credentials in Jenkins
Provar now supports masking credentials in Jenkins without needing to check the Provar .secrets file into GitHub. This is to reduce exposure of the credentials used in Test Case execution. The solution is to use Jenkins’ credentials plugin to set up the passwords and security tokens as environment variables.
Prerequisites in Masking Credentials in Jenkins
- A Jenkins server
- Required privileges on Jenkins to install plugins and create a project
Download Required Plugins
You will need to download and install three Jenkins plugins:
- Credentials plugin: provides a centralized way to define credentials that can be used by your Jenkins instance, plugins and build jobs.
- Credentials Binding plugin: allows you to configure your build jobs to inject credentials as environment variables.
- Plain Credentials plugin: a plugin dependency required by the Credentials Binding plugin.
When all three plugins are installed, your Jenkins installation has the required directives to allow you to inject secrets into Jenkins.
Create Credentials
Go to Jenkins (menu) and choose Credentials.
Create a new user and password credentials. Once it’s created, copy its credentials ID. This is a hash which is used by Jenkins to identify these specific credentials.


Create and Configure your New Build Job
Create a new item (new job), name it, and select Freestyle project or any other.

After installing the plugins, you will now have a new option under Build Environment which is called Use secret text(s) or file(s). Tick this option and a new box will appear: Binding and underneath it Add:

Click Add and choose Username and password (separated):

A new box will appear. Here you can enter the variable name which will hold the real username as in the credentials. You can also enter the variable name for the password which will hold the real password as in the credentials:

Provide a Build Step of Invoke Ant:

Provide the ANT build file path location:

Then save your Project.

Test Configuration
Remove .secrets from the Provar Project.

Run your job and check console output.
Console Output
Application successfully launched without having .secrets file in a Project:

And if run same project from Provar you will see error message:

- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Override auto-retry for Test Step
- Managing test steps
- Namespace org testing
- NitroX
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI license Check
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines Using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team Foundation Server
- Version control
- Provar Automation trial guide and extensions
- Salesforce Testing
- Provar Manager
- Best Practices
- Troubleshooting
- Release Notes