Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Salesforce NLPs and queries

Salesforce testing has 19 NLPs of its own, available in no other application type. They read the metadata synced from your org, so a step can name an object, a field, or a connection directly instead of navigating the UI to reach it. There are also 2 ways to query Salesforce data from a test.

Before you use any of them, the org needs a metadata connection. See Set up Salesforce testing.

NLPWhat it doesInputs
Login to Salesforce Application application using Salesforce Connection connectionSigns in to the configured instance with a chosen application and user connectionSalesforce Application, Salesforce Connection
Login to Salesforce using Salesforce ConnectionSigns in with a chosen user connection. This is the default NLP for a test caseSalesforce Application
Switch to Salesforce Application applicationSwitches to the application you selectSalesforce Application
Navigate to Salesforce tabMoves to a tab within the same applicationSalesforce Tab
NLPWhat it doesInputs
Create record in Salesforce Object Form using Salesforce Connection connection and store the record id in variable test dataCreates a record through the create record API and stores its RECORD_ID in a variableSalesforce Connection, Salesforce Object Form, variable
Update record in Salesforce object form where record id is test data using Salesforce connection connectionUpdates a record through the update record APISalesforce Connection, Salesforce Object Form, RECORD_ID
Open the create Salesforce Object record formOpens the create record form on the selected tabSalesforce Object
Open the edit Salesforce Object form where record id is Record IDOpens the edit form for a specific record on the selected tabRecord ID, Salesforce Object
Open the Salesforce Object details page where record id is Record IDOpens the record’s view page on the selected tabRecord ID, Salesforce Object
Delete record in Salesforce Object where record id is test data using Salesforce Connection connectionDeletes a record through the delete record APIRECORD_ID, User Connection, Salesforce Object
Get record details from Salesforce Object Form for RECORD_ID test data using Salesforce Connection connectionFetches a record’s details for the selected object fields. Variables and verifications can be added straight from the response bodySalesforce Object Form, RECORD_ID, Salesforce Connection
Store the recordID from details page into variableCaptures the record ID from the details page currently displayed and saves it to a runtime variable during execution, for later steps to useRecord ID, variable
NLPWhat it doesInputs
Select multiple options using value test data in the element multipicklistSelects values in a multipicklistTest Data, Element
Remove multiple options using value test data in the element multipicklistRemoves values from a multipicklistTest Data, Element
Undo field in elementUndoes the update on the selected fieldElement
Enter test data in the element richInput text boxEnters text into a rich input textboxTest Data, Element
Select option test data from element picklistSelects an option from a picklistTest Data, Element
Search test data on element lookupSearches within a lookup fieldTest Data, Element
Clear and enter test data in the element fieldClears whatever is in the field, then enters the test dataTest Data, Element

Table NLPs act on a Salesforce listview, a virtual table whose cells behave differently from one another: some are editable, some are dropdowns, some hold checkboxes. They act on those cells directly rather than through generic clicks.

Add table NLPs the same way as any other step, from the Test Case Details page.

Two features run SOQL against your org, and which you use depends on whether you want to write the query yourself.

A SOQL step retrieves live Salesforce data during a run, so a test can verify values in real records and reuse them in later steps.

  1. Open the test case, click the step options list, and select SOQL.

  2. Select a connection from Salesforce Connection, or parameterize it.

  3. Enter the query in the editor and click Run Query.

  4. Read the response on the Table, Outline, or JSON tab.

  5. On the Outline tab, store values as variables or add verifications from the response.

  6. Click Create to add the step to the test case.

A query looks like this:

SELECT Id, Name, Phone, Industry, BillingCity, BillingState
FROM Account
WHERE Industry = 'Technology' AND BillingState = 'CA'
ORDER BY Name
LIMIT 50

Query Builder assembles the same SOQL without writing it, and previews the query as you go.

  1. Open Salesforce Query Builder from the utility panel on the test case page.

  2. Select the connection from SF Connection.

  3. Choose a Salesforce object in FROM, such as Account or Contact.

  4. Add fields in SELECT, such as Type, RecordTypeId, or Industry. The preview updates as you add them.

  5. Click + Add Condition to filter with a WHERE clause.

  6. Set ORDER BY and LIMIT for the order and the number of records.

Query Builder, with the connection, the object, and the field list for SELECT

Was this page helpful?