API testing
Provar provides various APIs to assist in the rapid creation and maintenance of test data. To add an API test step, click on a row in the org browser and drag it into your test case. These APIs can also be used to mass-create or update test data, working alongside a source such as an Excel spreadsheet.
Usage
To add an API test step, click on a row in the org browser and drag it into your test case. Test steps will be added with the same connection as the one selected in the org browser, but this can be overridden if wanted.
Note: Provar generally logs the Salesforce test data created during a test run. This can be controlled per test case, and is controlled by the Enable Object Id Logging checkbox on the Salesforce Connect test step.
Provar can automatically delete data at the end of a test run if wanted. To enable this option, tick the checkbox Auto Cleanup. If the test case’s connection user does not have privileges to perform the cleanup, specify an admin connection in Cleanup Connection Name. This information will be written to the log file when the cleanup is performed.
SOQL query
A SOQL Query test step is useful for pulling data from specific Salesforce records. Refer to Salesforce’s documentation for more information on SOQL.
To use this API, click and drag a row from the org browser into the test case, then select Add a SOQL Query Step. Make sure that the row chosen in the org browser corresponds to the object you want to query (e.g. Opportunity).
Select which fields to return in the query. Then click the OK button.
This will automatically generate a simple SOQL statement. This statement can be amended manually, e.g. to add a WHERE clause. Refer to the Org Browser if you are unsure of the name for any given field.
When this test step is executed, it will populate OpportunityRows, or whatever name is specified in the Result List Name (see screenshot above). This can then be accessed in subsequent test steps. A period can be added after OpportunityRows to access a specific variable, e.g. OpportunityRows.Name.
Read/assert
A Read/Assert test step is useful for validating or checking data.
To use this API, click and drag a row of data from the org browser into the test case, then select Add an Object read/assert step. Make sure that the row chosen in the org browser corresponds to the object you want to read/assert (e.g. Opportunity).
In the form which follows, tick fields in the first column to read values and tick fields in the second column to create asserts. Then click the OK button.
This will automatically generate the following test step.
Note: An Object Id is required to run this test step.
In this example, reads and asserts have both been added. To add or remove fields after the test step has been added, click the
Read results will be added to the result object OpportunityRead, or whatever name is specified in the Result Object (see screenshot above). This can then be accessed in subsequent test steps. A period can be added after OpportunityRead to access a specific variable, e.g. OpportunityRead.StageName.
Asserts have been added as separate sections underneath, validating specific values for Name and Stage. If these are not passed during execution, the test step will fail.
Create
A Create test step is useful for creating records.
To use this API, click and drag a row from the org browser into the test case, then select Add an Object create step. Make sure that the row chosen in the org browser corresponds to the object you want to create (e.g. Opportunity).
Select which fields to populate in the test step. Note that required fields are ticked automatically. Then click the OK button.
This will automatically generate the following test step.
Note: the selected fields are shown under the Fields section.
To add or remove fields after the test step has been added, click the
When this test step is executed, a new record will be created and the record ID added to the variable named in Result Object Id, e.g. OpportunityId.
Update
An Update test step is useful for amending record information at the API level.
To use this API, click and drag a row from the org browser into the test case, then select Add an Object update step. Make sure that the row chosen in the org browser corresponds to the object you want to update (e.g. Opportunity).
Select which fields to populate in the test step. Note that required fields are also identified. Make sure that Object Id correctly identifies the record to be updated. Where applicable, it will be prepopulated based on the data row chosen from the org browser, but it should generally be updated to a variable storing the record Id, e.g. OpportunityId. Use Content Assist to locate the correct variable (CTRL + spacebar). In this example, OpportunityId is populated through the preceding Create test step.
Note: An Object Id is required to run this test step. The fields to be updated are shown under the Fields section.
To add or remove fields after the test step has been added, click the
Delete
A Delete test step is used to delete a record at the API level.
To use this API, click and drag a row of data from the org browser into the test case, then select Add an Object delete step. Make sure that the row chosen in the org browser corresponds to the object you want to delete (e.g. Opportunity).
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- 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
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- 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 Provar Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Provar 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 Provar 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
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Performance Best Practices
- Testing best practices
- Troubleshooting
- Browsers
- Configurations and permissions
- Connections
- DevOps
- Error messages
- Administrator has blocked access to client
- JavascriptException: Javascript error
- macOS Big Sur Upgrade
- Resolving failed to create ChromeDriver error
- Resolving Jenkins license missing error
- Resolving metadata timeout errors
- Test execution fails – Firefox not installed
- Update to Opportunity field validation behaviour
- Licensing, installation and firewalls
- Memory
- Test Builder and test cases
- Release notes