Testing Scheduled Actions, Bulk Data Load Jobs and an Auto-Response Rule in Salesforce

Share on facebook
Share on twitter
Share on linkedin
Most of the testers who are new to Salesforce may have questions as to where and how to test the following changes in Salesforce.

Most of the testers who are new to Salesforce may have questions as to where and how to test the following changes in Salesforce. In this article, we are going to see how to test the below salesforce concepts:

  1. Process Builder Scheduled actions
  2. Data Loader jobs in Salesforce
  3. Auto Response Rules

1. Testing Process Builder Scheduled actions: 

In Process builder, Scheduled actions (Time Dependent actions) cannot be tested immediately because the scheduled action will be executed at the scheduled time in the future. Now, we all have that question then how to test this? When? And Where?

Here is the solution. We can monitor the pending scheduled actions in Salesforce under ‘Flows’. Once the record meets the specified criteria for the scheduled action, it goes to queue and waits until it reaches the specified time. After it reaches the schedule time, the process re-evaluates the record to make sure that the records still meet the criteria for the scheduled actions. After re-evaluation, the scheduled action gets executed for the record. The scheduled actions waiting in a queue can be monitored under flows.

Scenario: Whenever a case is created with ‘New’ Status, a new Task should be created an after the Case is created.

For the above scenario, Automatic task creation is achieved by creating a process in a process builder. Here we must test like this.

Step 1:  Create a Case record with the status as “New”

testing scheduled actions

Step 2: Go to Setup, Click Create -> Workflow & Approvals -> Flows 

Scroll down and navigate to ‘Paused and Waiting interviews’.

testing scheduled actions

Below are the definitions for each column of ‘Paused and Waiting Interviews’ for the better understanding,

Action has a “DEL” link. Clicking on this link will delete the scheduled action.

Name indicates the waiting number for that action and the number is auto generated.

Flow Name indicates the corresponding Process Name.

Flow Version indicates the version of the process.

Type indicates the type of paused or waiting interview. Processes that are waiting to execute scheduled actions are of type workflow.

Interview Label indicates the Process API Name, Version No., Object Name of the waiting interview.

Paused Date indicates the date and time on which the flow interview started waiting.

Current Element identifies the group of scheduled actions that sales force is waiting to execute.

References: Pending Scheduled Actions in Process Builder

2. Testing Data Loader jobs in Salesforce: 

Data Loader is a client application used to import, update, upsert, export and delete records in Salesforce. It is mainly used for bulk process.

Using Data Loader, we can import a set of bulk records into Salesforce.

Note: It supports up to 5 million records for data processing at a time.

Scenario: Assume that, 50,100 records have been inserted into Lead object through data loader.

References: Data inserts by Data Loader

As a tester, how will you validate the exact count of records inserted by developers through data loader.

Step 1:  Login into Salesforce

Step 2: Go to Setup -> Jobs -> Bulk Data Load Jobs

You can monitor the status of the inserted record in Monitor Bulk Data Load Jobs in salesforce.

Most of the testers who are new to Salesforce may have questions as to where and how to test the following changes in Salesforce. In this article, we are going to see how to test the below salesforce concepts:

testing scheduled actions
testing scheduled actions

The Details of the job can be viewed by clicking the Job ID.

testing scheduled actions

Note: Generally, Data Loader inserts the records in batches. The Batch size of data loader is 200. If you enable the Use Bulk API checkbox in data loader settings, the batch size can be increased up to 2000. Click the View Result link for a batch to see the results. If anything failed during insertion process, you can see the failure reason by clicking View Result link under View Result column.

References: Monitoring Data Loader Jobs in Salesforce

3. Testing Auto Response Rules: 

The purpose of Auto Response rule is sending an automatic email to the users when a record meets a specific criterion. It is applicable for Lead and Case object.

Note: 

The Lead Auto response rule gets triggered and sends an email to the customer when the lead is submitted from web to lead or lead is created manually or lead is imported by using Data Loader.

The Case Auto Response rule gets triggered when the case is submitted from web to case form or case is created by email to case message or case is created manually.

References: Set up Auto Response Rules

Scenario: When a case is submitted via web to case, an auto response email should be sent to the case submitter. Also, needs to verify the status of the email.

The above scenario is achieved by Case auto response rule.

As per the requirement, we should validate the email status (ex: whether the email is sent to the customer or not). The status of the auto response emails can be tested in Email logs in Salesforce. The email logs help to monitor the email that sent to the users. We can see last 30 days logs in email logs.

Step 1:  Submit a case from web to case form.

testing scheduled actions

After submitting web to case form, the case record gets created in salesforce.

Step 2: Open that case record. Note down the “Date/Time Opened” in the record.

testing scheduled actions

Step 3: From Setup Click on Logs [Symbol] Email Log files

Step 4: Click on Request an email log

testing scheduled actions

Enter start time as Date/Time opened noted in the case record.

End time must be the current date and time.

Click on “Submit Request” button.

testing scheduled actions

An email log request takes some time to complete. After completion, the request gets moved to the email log section.

testing scheduled actions

Step 5: Download the email log file and verify in it. Email Log files gets downloaded as an Excel file.

testing scheduled actions

Verify the email id in the “Recipient” and its corresponding mail event.

The Email Id highlighted in the Recipient is the “Web Email” in the case record.

Mail Event:  

R – Reception

The email was successfully received.

D – Delivery

The email was successfully sent.

P – Permanent Failure

The email could not be delivered.

References: 

 Email Logs – Monitor Emails Sent Through Salesforce 

Mail Event in Email logs

Summary: 

The testers can monitor the Process builder scheduled actions, Data loader jobs and an auto response emails by following the above steps in Salesforce application. In Email logs, we can monitor the status of any email sent through the salesforce. So, we can refer the email logs for workflow and approval process email alerts also.

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Exploratory testing

Exploring the application, understanding how each feature works, and based on understanding testing the whole application – It is exploratory testing.
Exploratory testing needs a tester to listen, read, think, and report, effectively and rigorously.

Read Article »

Mobile Responsive Testing

Mobile Responsive Testing is simply a Testing Process performed to make sure that your website or an app is working appropriately on all types of devices.
Whether it an app or website, they need to ensure that they are accessible from any device, anytime, anywhere.

Read Article »

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.