Skip to content
TestsigmaDOCS

Salesforce Testing

SOQL as Test Step

Prerequisites

  • Before you begin, ensure the Salesforce app is connected to Testsigma with a valid metadata connection.

  1. From the left navigation bar, navigate to Create Tests > Test Cases. soql as test step 1

  2. In the Test Case Details page, click on the test step options list and select SOQL. soql as test step 2

  3. Select a Salesforce connection from the Salesforce Connection dropdown or you can parameterize your connection. soql as test step 3

  4. Enter your SOQL query in the editor and click Run Query to fetch the results.

    For example,

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

    soql test step 4

  5. View the response in Table, Outline, or JSON format by switching between the tabs. soql as test step 5

  6. In the Outline tab, store values as variables or add verifications directly from the response. soql as test step 6

  7. Click Create to save and add the SOQL step to your test case. soql as test step 7