testRigor & Salesforce
  • NO-CODE UI TESTING: Guide for testRigor & Salesforce
  • Getting Started
    • Get a Salesforce Hands-On Playground Org (free)
    • Get testRigor (free) and create a Test Suite
    • Create Test Case (T00001)
    • Navigation in Salesforce
    • Navigation in testRigor
  • BASIC TEST CASES
    • Record, edit and play a Test Case (T00002)
    • Create and convert a Lead (T00003)
    • Create more records (T00004)
    • Check Account Validation Rule (T00005)
  • ADVANCED TEST CASES
    • Account Action and List View Button (T00006)
    • Validate Field Value Using REST API (T00007)
    • E2E: Lead entry (Titan) âž” Salesforce âž” Email
  • OTHER TEST SCENARIOS
    • Submit a Test Lead
    • TH: Opportunity Won THEN Create Contract
    • Monitor data in your website
    • Monitoring in Production
  • FLOW TEST CASES
    • Screen Flow: Update Email Address
  • E-BIKES SAMPLE APP
    • E-Bikes sample app description
    • testRigor version of the UTAM TEST (EBIKES-00001)
    • Product Explorer - Electra X3 (EBIKES-00002)
    • Reseller Order - Create (EBIKES-00003)
    • Case - Create (EBIKES-00004)
  • LWC RECIPES SAMPLE APP
    • LWC Recipes sample app description
    • Test Case for LWC Recipes (LWC-00001)
  • CORAL CLOUDS SAMPLE APP
    • Coral Clouds sample app description
    • Experience - Generate Description using AI (CC-00001)
    • Experience - Generate Reviews Summary using AI (CC-00002)
  • MORE INFORMATION
    • About testing
    • About testing in Salesforce 🤔
    • About test automation
    • About Test-Driven Development (TDD)
    • About testRigor
    • About using testRigor
    • About other solutions
  • FEEDBACK
    • Questions? - Comments!
Powered by GitBook
On this page
  • Hmmm...
  • Materials by Salesforce
  • Automation Learning Map
  • architect.salesforce.com
  • Help
  • engineering.salesforce.com
  • Salesforce Developers
  • Other Solutions
  • Other Sources
  • Testing in Trailhead
  • Trailhead
  • Trail: Explore Software testing
  • Module: Build Processes and Unit Tests for Salesforce B2C Commerce Technical Architects
  • Test Automation in Production
  • Deleting test records
  1. MORE INFORMATION

About testing in Salesforce 🤔

PreviousAbout testingNextAbout test automation

Last updated 5 months ago

Hmmm...

  • Customized features in Salesforce may orchestrate actions in several development/configuration tools: Apex, Flow, Process Builder, Workflow Rules, ... There is no out-of-the-box testing functionality that covers all these tools.

  • Using Apex test coverage % as a quality KPI may be OK for unit testing Apex. But only if you know what the tests validate and how they do it. In a laissez-faire development model this KPI is not a valid indicator for the quality of the Apex code base.

  • Apex Test Classes and tests in After Save Flows can validate "behind-the-curtain" transactions.

    • Unfortunately, these may be low level Unit Tests that test the implementation details.

    • In some cases Unit Tests are written only to pass the test coverage %


Materials by Salesforce

Automation Learning Map

Just like a waterfall?

  • Assess & Plan âž” Design âž” Build âž” Test âž” Deploy âž” Manage and Maintain


architect.salesforce.com

  • Resilient - Testing Strategy:

  • Point of the view of technical architecture?


Help

  • Testing Your Flow

  • Troubleshoot Flow Errors


engineering.salesforce.com

    • "Throughout our development lifecycle, we continuously create and run tests. In fact, within the development phase alone we run over 1.2 million automated tests."

  • Ian Varley (2024): Configuring It All Out


Salesforce Developers

  • Salesforce Developers Blog

  • Salesforce Developers Podcast

  • Georg Neumann


Other Solutions


Other Sources


Testing in Trailhead

Trailhead

  • Flow Testing: Step-by-Step

    • 15 mins = 100 points = woohoo!

Trail: Explore Software testing

Module: Overcome Testing Challenges with Automation

Testing Challenges:

  1. Challenge #1: Complex DOM Structure

  2. Challenge #2: Internal Framework Changes

  3. Challenge #3: Objects Behind Shadow DOM

  4. Challenge #4: 3x Releases Every Year


Module: Build Processes and Unit Tests for Salesforce B2C Commerce Technical Architects

  • SFRA Testing Technologies

    • Supported testing technologies include these kinds of tests:

      • Controllers are tested with integration tests. Salesforce B2C Commerce uses mocha, chai, and request-promise for integration testing.

      • Models are tested with unit tests. B2C Commerce uses mocha, chai, sinon, and proxyquire for unit tests.

      • Views are tested with functional tests. B2C Commerce uses mocha, chai, and webdriver.io for functional tests.


Test Automation in Production

  • Probably it's not a good idea to create test records in Production.

  • "Observation only" tests might be OK:

    • like "check that latest Currency Exchange Rates were updated in Salesforce"

  • There are security concerns.


Deleting test records

  • tagging test records makes it easier

    • not to mix them with production records

    • to delete test records

// ONLY IN SANDBOX / DEV ORG / TRAILHEAD HANDS-ON PLAYGROUND
List<Opportunity> oppoList = [SELECT Id FROM Opportunity WHERE Account.Name LIKE '!TEST%'];
delete oppoList;

List<Contact> contList = [SELECT Id FROM Contact WHERE Account.Name LIKE '!TEST%'];
delete contList;

List<Account> acctList = [SELECT Id FROM Account WHERE Name LIKE '!TEST%'];
delete acctList;

Josh Meier (2024):

Prantap Bedi (2024):

Jae Taylor (2024):

Dmitry Melanchenko (2024):

Philippe Ozil (2022):

Dan Stead (2021):

Jonathan Au (2020):

Georg Neumann ( 2019):

(2021):

CRMCOE (2021) : (1 hour video)

https://architect.salesforce.com/well-architected/adaptable/resilient#Testing_Strategy
https://help.salesforce.com/s/articleView?id=platform.flow_concepts_testing.htm
https://help.salesforce.com/s/articleView?id=platform.flow_troubleshoot_email.htm
Tester Augmentation, Not Test Automation
Automating Complex End-to-End Tests
6 Ways We Deliver on Our Promise of Availability and Performance
What is observability?
Run End-to-End Tests with the UI Test Automation Model (UTAM)
Automated Testing with the Salesforce Mobile App & Appium
UI Test Automation on Salesforce
Automated Testing of Global Search in Lightning UI
Episode 201: Test Automation using MaxTAF with Alex Delic
UI Test Automation for Salesforce
About other solutions
Salesforce Test Automation
https://trailhead.salesforce.com/content/learn/modules/flow-testing-and-distribution
https://trailhead.salesforce.com/content/learn/trails/explore-software-testing
https://trailhead.salesforce.com/content/learn/modules/salesforce-app-testing-with-provar/overcome-testing-challenges-with-automation
https://trailhead.salesforce.com/content/learn/modules/b2c-build-processes-and-tests-for-technical-architects
https://developer.salesforce.com/docs/commerce/sfra/guide/b2c-testing-sfra.html
NO-CODE UI TESTING: Guide for testRigor & Salesforce
https://help.salesforce.com/s/articleView?id=platform.flow_get_started_learning_map.htm