Documentation

Looking for something in particular?

API Testing

Provar Automation provides various APIs to assist in rapidly creating and maintaining 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.

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. Ensure 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 unsure of any field’s name.

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 helps validate or check 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. Ensure that the row in the org browser corresponds to the object you want to read/assert (e.g., Opportunity).

In the following form, tick fields in the first column to read values and tick fields in the second column to create assertions. 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   icon at the top of the Test Step parameters.

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, validating specific values for Name and Stage. If these are not passed during execution, the test step will fail.

Create


A Create test step helps create 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. Ensure 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 the 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  icon at the top of the Test Step parameters.

When this test step is executed, a new record will be created, and the record ID will be added to the variable named in Result Object Id, e.g., OpportunityId.

Update


An Update test step helps amend 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. Ensure 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 the Object Id correctly identifies the record to be updated. Where applicable, it will be pre-populated 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 icon at the top of the Test Step parameters.

Delete


Delete test step deletes 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. Ensure that the row chosen in the org browser corresponds to the object you want to delete (e.g., Opportunity).

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top