Test Cases for Salesforce (Manual + Live)


With Testsigma, creating test cases for Salesforce is easy as we can leverage Metadata artifacts, smart NLPs, and the debugger to Automate Salesforce Testing. Metadata artifacts help auto-learn Salesforce components, smart NLPs simplify test scenario expression, and the debugger facilitates real-time test authoring. This article discusses creating test cases for Salesforce Automation and using the debugger for Live Test Authoring in Testsigma.

Here’s a quick video demonstrating how create test cases for Salesforce testing.


Prerequisites


Steps to Create Test Cases for Salesforce

  1. Navigate to Create Tests > Test Cases and click on Create Test Case. Test Cases
  2. From the Test Case Details page, you can create the test steps for your test case using either of the following methods:

    • Write test steps manually using Smart NLPs by clicking Add new step.
    • Use Recorder to record steps. Manual + Live
  3. Once the test steps are created, click on Run to execute the Test Case. Run
NOTE:

For advanced options, refer to test case advanced options.


Sample Test Case for Salesforce Automation

Let's say we have a scenario where we want to log in to Salesforce, navigate to the Sales tab, create a Lead record, and Edit the record form. Regular UI interactions require a lot of steps. However, with Testsigma's smart NLPs, we can automate the same flow in just four steps.

  1. Use the NLP, Login to Salesforce using Salesforce Connection. Here, we can choose a connection or create a connection by clicking on Add Connection. Add Connection
  2. Use the NLP, Switch to Application and replace application from the dropdown. Sales
  3. Use the NLP, Create record using Salesforce Connection in Salesforce Object Form and store RECORD_ID in variable test data. API Step

This is API Step where we create a Lead record using Salesforce Connection in Lead and store the record ID in a Variable. We will use this variable to open the editing form with the record ID.

  1. Use the NLP, Open edit form for record with Record ID on Salesforce Object. Here, we open the edit form with the record ID stored in the variable in the previous step. Edit Form
  2. Click on Record. This will open a Chrome window along with the test recorder. All the steps will be executed up to that point, and you can start recording UI interactions by clicking on the play icon. Record
  3. Perform the actions and click on Stop Recording. This will open the Stop Web Debugger warning prompt. Stop Recording
  4. On the Stop Web Debugger run warning prompt, click on Stop. Stop Warning
  5. Refresh the Test Case Details page to see all the recorded steps. Test Case Details