Provar: Test Automation for Salesforce Applications
Testing Salesforce applications presents unique challenges that general-purpose automation tools handle poorly. Salesforce's dynamic element IDs, Lightning Web Components, and complex metadata structure break standard Selenium-based scripts within days of a Salesforce org update.
Provar was built specifically for this problem. It's a Salesforce-native test automation platform that understands the metadata layer, handles dynamic element identification, and integrates with the Salesforce development lifecycle.
Why Salesforce Testing Is Different
Before discussing Provar, it's worth understanding why generic test automation tools struggle with Salesforce:
Dynamic element IDs. Salesforce generates IDs like j_id0:j_id1:j_id4:0:inputText that change between page loads, deploys, and even sessions. CSS selectors that work today break tomorrow.
Metadata-driven UI. Salesforce fields, layouts, and components are defined in metadata, not hardcoded HTML. A field labeled "Account Name" in your org might have a completely different internal name in another.
Lightning Experience rendering. Salesforce Lightning uses Shadow DOM extensively, which breaks standard querySelector and most WebDriver element location strategies.
Frequent platform updates. Salesforce releases three major updates per year (Spring, Summer, Winter). Each release can change internal rendering enough to break recorded tests.
Provar addresses all of these by abstracting element location through Salesforce metadata rather than HTML selectors.
What Is Provar?
Provar is a commercial test automation platform with three main components:
- Provar Desktop: Java-based IDE for authoring and running tests locally
- Provar CI: Command-line execution engine for CI/CD pipelines
- Provar Manager: Test management and reporting platform (separate product)
Tests are authored visually or in a low-code format. The execution engine handles the complexity of Salesforce's dynamic rendering.
Installation
Provar Desktop requires Java 11+ and runs on Windows, Mac, and Linux.
- Download the installer from the Provar website
- Run the installer
- On first launch, configure your Salesforce org connection:
- Environment URL
- Username/password or OAuth
- API version
Connecting to a Salesforce Org
Provar uses Salesforce connected apps for authentication. Setup:
- In Salesforce Setup, create a Connected App with OAuth enabled
- In Provar, go to File > Preferences > Salesforce Connections
- Add your org credentials
- Provar downloads the metadata from your org
The metadata download is what enables Provar's intelligent element location — it knows your field labels, object names, and page layouts without hardcoding selectors.
Creating Your First Test
Test Builder Interface
Provar's test builder presents a record-and-click interface:
- Create a new test suite and test case
- Click Record — Provar opens a controlled browser session
- Navigate to your Salesforce application
- Interact with the UI — Provar captures each step using metadata-aware location
The generated test steps read in plain language:
Navigate to Contact Record '0031000000ABC123'
Set 'First Name' to 'John'
Set 'Last Name' to 'Smith'
Set 'Email' to 'john.smith@example.com'
Click 'Save'
Assert 'First Name' equals 'John'Because Provar resolves element location through metadata, these steps remain stable even when Salesforce updates its rendering.
Test Blocks
Reusable test blocks let you define common sequences once:
Test Block: Login to Salesforce
1. Navigate to login URL
2. Enter username
3. Enter password
4. Click Login button
5. Wait for Home page
Test Block: Create Contact
1. Navigate to Contacts
2. Click New
3. Fill contact form fields
4. Save
5. Assert record createdReference blocks in test cases:
Test: End-to-End Lead Conversion
1. [Block] Login to Salesforce
2. Navigate to Lead record
3. Click Convert
4. [Block] Create Contact (from lead data)
5. Assert Opportunity created
6. Assert Account associatedMetadata-Aware Element Location
This is Provar's core differentiator. Instead of:
/* Fragile: breaks when Salesforce changes its markup */
.forceDetailPanel input[data-field-id="00N...field..."] Provar uses:
Object: Contact
Field: Email
Action: Set valueThe metadata resolution happens at runtime, so the same test works across sandboxes, production, and after platform updates.
Working with Custom Objects
Custom objects work the same way:
Navigate to: [Custom Object] Project__c
Set field: [Custom Field] Budget__c to '50000'
Set field: [Custom Field] Status__c to 'In Progress'
Set lookup: [Lookup Field] Account__c to 'Acme Corp'Provar handles picklist validation, lookup search, and required field checking automatically based on the metadata it pulled from your org.
Handling Lightning Web Components
Salesforce's LWC-based UI uses Shadow DOM, which is notoriously difficult to automate. Provar handles this transparently — you interact with Lightning components using the metadata API, not by piercing Shadow DOM.
For custom LWC components you've built, Provar provides component-level locators:
Component: c-my-custom-component
Action: Click button with text 'Submit'
Property: data-testid='submit-btn'API Testing Within Provar
Provar includes Salesforce API testing alongside UI testing:
Step: SOQL Query
Query: SELECT Id, Name FROM Contact WHERE Email = 'john@example.com'
Store result as: contact_record
Step: Assert
Field: contact_record.Name
Equals: 'John Smith'
Step: Apex REST Call
Method: POST
Endpoint: /services/apexrest/myapi/
Body: {"action": "process", "recordId": "${contact_record.Id}"}
Assert: Response.status = 200Combining UI and API steps in one test lets you set up data via API (faster) and verify the UI outcome, or vice versa.
CI/CD Integration
Salesforce DX Integration
Provar integrates with SFDX's scratch org workflow:
# Create scratch org
sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg
# Push source
sfdx force:source:push -u MyScratchOrg
# Run Provar tests against scratch org
java -jar provar-cli.jar \
-testProject /path/to/tests \
-environment MyScratchOrg \
-testSuite RegressionSuite \
-resultsDir /resultsGitHub Actions Pipeline
name: Salesforce Tests
on:
push:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
- name: Set up Salesforce CLI
uses: forcedotcom/setup-sfdxcli@v1
- name: Authorize org
run: |
echo "${{ secrets.SF_AUTH_URL }}" | sfdx force:auth:sfdxurl:store -f - -a TestOrg
- name: Deploy metadata
run: sfdx force:source:deploy -u TestOrg -p force-app/
- name: Run Provar tests
run: |
java -jar provar-cli.jar \
-testProject tests/ \
-environment TestOrg \
-testSuite Regression \
-resultsDir results/
env:
PROVAR_LICENSE: ${{ secrets.PROVAR_LICENSE }}
- name: Publish results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: results/Jenkins Integration
pipeline {
agent any
stages {
stage('Test') {
steps {
sh '''
java -jar provar-cli.jar \
-testProject ${WORKSPACE}/tests \
-environment ${SF_ENV} \
-testSuite RegressionSuite \
-resultsDir ${WORKSPACE}/results
'''
}
post {
always {
junit 'results/*.xml'
publishHTML([
reportDir: 'results/html',
reportFiles: 'index.html',
reportName: 'Provar Test Results'
])
}
}
}
}
}Provar Manager
Provar Manager is a separate test management platform that pairs with Provar automation:
- Test case library with Salesforce org mapping
- Execution history and trend analysis
- Integration with Jira, Azure DevOps, and other issue trackers
- Coverage reporting against Salesforce features and objects
It's priced separately and targets teams that want visibility beyond the raw test results.
Provar vs Alternatives for Salesforce Testing
| Tool | Salesforce-Native | Shadow DOM | Metadata Aware | Cost |
|---|---|---|---|---|
| Provar | Yes | Handled | Yes | Paid |
| Selenium | No | Manual | No | Free |
| Copado Robotic Testing | Yes | Handled | Yes | Paid |
| Testim | Partial | Handled | No | Paid |
| Playwright | No | Handled | No | Free |
| UTAM | Yes (LWC) | Yes | No | Free |
Selenium/Playwright: Can work for Salesforce but requires constant maintenance as dynamic IDs and Shadow DOM changes break selectors. Not recommended for large Salesforce test suites.
Copado Robotic Testing: Similar positioning to Provar, part of the Copado DevOps platform. Better fit if you're already using Copado for release management.
UTAM (UI Test Automation Model): Salesforce's own open-source framework for LWC testing. Lower-level than Provar, requires more coding, but free.
Limitations
Cost. Provar is enterprise-priced. For small teams or single-developer shops, the cost may not be justifiable vs. investing time in Playwright + custom Salesforce handling.
Salesforce-only. Provar doesn't help if you need to test non-Salesforce parts of your application (custom backends, third-party integrations that open in new windows).
Desktop client. The test authoring IDE is a Java desktop application. It works, but the UI is dated compared to browser-based tools.
Learning curve. Provar's metadata-centric model takes time to learn, especially for teams coming from code-first automation frameworks.
Summary
Provar solves a real problem. Salesforce's metadata-driven, Lightning-rendered UI is genuinely difficult to automate reliably with generic tools. Provar's metadata-aware element location strategy makes tests dramatically more stable across Salesforce updates.
For organizations with significant Salesforce testing needs — multiple orgs, complex workflows, frequent releases — the investment in Provar pays off in reduced maintenance cost compared to hand-rolled Selenium/Playwright solutions.
For smaller teams or simpler Salesforce use cases, evaluating UTAM or a maintained Playwright setup first is worth the time before committing to a Provar subscription.