Module 03: Test Case Design in Salesforce
Developing structured, repeatable, and effective test cases to validate Salesforce functionality and business logic.
Introduction
Test Case Design is an important part of Salesforce QA. It involves creating detailed test cases to verify that Salesforce features and functions work according to business requirements. Properly designed test cases help testers identify bugs, improve system quality, and ensure reliable application performance.
What is a Test Case?
A Test Case is a set of conditions or actions used to verify that a specific function or feature in the system works correctly. Structured test cases ensure consistency across testing cycles.
Standard Test Case Components:
- Test Case ID & Scenario
- Detailed Test Steps & Test Data
- Expected vs. Actual Results
- Final Status (Pass/Fail)
Test Case Design Techniques
Using the right techniques ensures that you cover all possible user interactions within Salesforce.
1. Positive Testing
Verifies the system works with valid data. Example: Saving a Lead with correct details.
2. Negative Testing
Checks behavior with invalid data. Example: Entering a wrong email format in a Contact field.
3. Boundary Value
Tests the limits of input fields (e.g., testing exactly 50 or 51 characters in a 50-char field).
4. Equivalence Partitioning
Dividing data into groups (e.g., Valid Age 18-60 vs. Invalid Age <18 or >60).
Salesforce-Specific Test Scenarios
When designing for Salesforce, focus on these platform-specific areas:
- Object Functionality: Testing Create, Read, Update, and Delete (CRUD) operations on Accounts or Leads.
- Validation Rules: Ensuring mandatory fields show errors when left blank.
- Automation: Verifying Email Alerts, Field Updates, and Task creation triggered by Workflows.
- User Permissions: Ensuring Sales users cannot access Admin-only settings.
Test Case Template Example
| ID | Test Scenario | Test Steps | Expected Result |
|---|---|---|---|
| TC001 | Create New Lead | Enter lead details and click Save | Lead record should be created successfully |
| TC002 | Mandatory Field Validation | Leave required field blank and save | System should display validation error |
| TC003 | Update Account Record | Modify account information | Changes should be saved correctly |
Best Practices
Keep cases clear, simple, and realistic.
Cover both Positive and Negative scenarios.
Ensure one clear objective per test case.
Summary
Test Case Design is a key part of Salesforce QA testing. Well-designed test cases ensure that features, automation, and data processes work correctly, reducing the chances of critical system defects in Production.
