SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Unit Testing More than Apex
Testing the Declarative Side of the Salesforce1 Platform
​ Mike Chale
​ Senior Developer
​ @Trifecta
​ @mike_chale
​ 
Deliver consistent customer experiences across web, mobile, and eCommerce platforms that are
fully integrated into your business systems.
​ 20+ Years developing enterprise solutions, primarily focused on commerce
​ 100+ Salesforce Certifications, including a Salesforce MVP
Trifecta Commerce – Available on the AppExchange
​ Native app, streamlines order entry supporting B2B and B2B2C commerce.
Top Industries Served:
​ Manufacturing/Distribution
​ CPG/Retail
​ Life Sciences
​ Hospitality and Entertainment
Who is Trifecta?
Visit our booth – #2021 Moscone North
Unit testing has one job . . .
Source: https://www.pinterest.com/pin/460141286900183385/
1.  Ensure customizations work as expected
2.  Verify edge cases
3.  Make changes confidently
4.  Preserve knowledge
Why Unit Test?
When I saw the light. . .
​ . . . this was step 1 of a 3 step field update process
1.  Change Management
2.  Declarative features replacing code
3.  Save time
Why Unit Test Metadata?
1.  Verify sObject rules
1.  Required fields
2.  Lookup filters
3.  Validation rules
Unit Testing Metadata
§  Leads are converted without contact information!
§  Need company size on Lead for classification
§  Accounts have their Key Contact outside of the company
Sample Request #1
Demo
1.  Verify sObject rules
2.  Verify critical processes
Unit Testing Metadata
1.  Are the entry criteria working as expected?
2.  Is it going to the correct person/people?
3.  Check all branches
Verifying Approval Processes
§  All “big deals” need to be approved
§  Deals worth at least $50,000 go to manager
§  Deals over $100,000 require secondary approval
Sample Request #2
Demo
1.  Verify sObject rules
2.  Verify critical processes
3.  Verify complex Process Builder
1.  Post to Chatter
2.  Auto-submit Approval
Unit Testing Metadata
§  Processes can have multiple branches
§  Each branch can perform multiple steps
§  Post to Chatter
§  Update self / related records
§  Submit for Approval
§  Invoke Apex and Flows
Testing Process Builder
§  Approval Process is great!
§  Can the Opportunity be submitted automatically?
§  And @mention the manager
Sample Request #3
Demo
1.  Verify sObject rules
2.  Verify critical processes
3.  Verify complex Process Builder
1.  Post to Chatter
2.  Auto-submit Approval
3.  Update and create records
Unit Testing Metadata
§  Need reminders!
§  Can we automatically convert an Opportunity to an Order?
§  And create the Contract?
Sample Request #4
Demo
§  Complex orgs have many interactions
§  Workflows and Process Builder can be complex
§  Save time with regression testing
Recap
§  Presentation and sample code - https://github.com/chalemic/UnitTestingMoreThanApex
§  How to Write Good Unit Tests -
https://developer.salesforce.com/page/How_to_Write_Good_Unit_Tests
§  Testing Best Practices -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_testing_best_practices.htm
§  Apex Approval Processing Example -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_process_example.htm
§  Apex Lead Convert Class -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_dml_convertLead.htm
Resources
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Getting Started with Process Builder
Getting Started with Process BuilderGetting Started with Process Builder
Getting Started with Process BuilderSalesforce Admins
 
E-TAIL QA: Approach to E-commerce testing in an Agile environment
E-TAIL QA: Approach to E-commerce testing in an Agile environmentE-TAIL QA: Approach to E-commerce testing in an Agile environment
E-TAIL QA: Approach to E-commerce testing in an Agile environmentNurun
 
Leveraging JavaScript Promises and the Bulk API
Leveraging JavaScript Promises and the Bulk APILeveraging JavaScript Promises and the Bulk API
Leveraging JavaScript Promises and the Bulk APISalesforce Developers
 
Why software testing
Why software testingWhy software testing
Why software testingtransformtoit
 
Working of the internet-IP Address
Working of the internet-IP AddressWorking of the internet-IP Address
Working of the internet-IP AddressCodewizacademy
 
Service objects in Rails tests - factory_girl replacement
Service objects in Rails tests - factory_girl replacementService objects in Rails tests - factory_girl replacement
Service objects in Rails tests - factory_girl replacementAndrzej Krzywda
 
Chemicalize Pro - Cheminfo Stories 2020 Day 5
Chemicalize Pro - Cheminfo Stories 2020 Day 5Chemicalize Pro - Cheminfo Stories 2020 Day 5
Chemicalize Pro - Cheminfo Stories 2020 Day 5ChemAxon
 
SOA-C01 Dumps Questions
SOA-C01 Dumps QuestionsSOA-C01 Dumps Questions
SOA-C01 Dumps QuestionsBraindumps4IT
 
A Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersA Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersSalesforce Developers
 
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18Gary Thayer
 
Episode 12 - Basics of Trigger
Episode 12 - Basics of TriggerEpisode 12 - Basics of Trigger
Episode 12 - Basics of TriggerJitendra Zaa
 
How to use New Technology to become more efficient
How to use New Technology to become more efficientHow to use New Technology to become more efficient
How to use New Technology to become more efficientAndy Carruthers
 
Your Tests Are Not Your Specs
Your Tests Are Not Your SpecsYour Tests Are Not Your Specs
Your Tests Are Not Your SpecsHillel Wayne
 
ASCENT MANUFACTURING INC
ASCENT MANUFACTURING INCASCENT MANUFACTURING INC
ASCENT MANUFACTURING INCDavid Kramer
 
ABControls Project Design & Delivery Steps
ABControls Project Design & Delivery StepsABControls Project Design & Delivery Steps
ABControls Project Design & Delivery StepsMikeNariman
 
Shorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexShorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexSalesforce Developers
 
Q1 2020 feature roundup - slide deck
Q1 2020 feature roundup - slide deckQ1 2020 feature roundup - slide deck
Q1 2020 feature roundup - slide deckritika2006
 
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgt
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgtStilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgt
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgtDynatrace
 

Was ist angesagt? (20)

Getting Started with Process Builder
Getting Started with Process BuilderGetting Started with Process Builder
Getting Started with Process Builder
 
E-TAIL QA: Approach to E-commerce testing in an Agile environment
E-TAIL QA: Approach to E-commerce testing in an Agile environmentE-TAIL QA: Approach to E-commerce testing in an Agile environment
E-TAIL QA: Approach to E-commerce testing in an Agile environment
 
Leveraging JavaScript Promises and the Bulk API
Leveraging JavaScript Promises and the Bulk APILeveraging JavaScript Promises and the Bulk API
Leveraging JavaScript Promises and the Bulk API
 
Why software testing
Why software testingWhy software testing
Why software testing
 
Working of the internet-IP Address
Working of the internet-IP AddressWorking of the internet-IP Address
Working of the internet-IP Address
 
Service objects in Rails tests - factory_girl replacement
Service objects in Rails tests - factory_girl replacementService objects in Rails tests - factory_girl replacement
Service objects in Rails tests - factory_girl replacement
 
Chemicalize Pro - Cheminfo Stories 2020 Day 5
Chemicalize Pro - Cheminfo Stories 2020 Day 5Chemicalize Pro - Cheminfo Stories 2020 Day 5
Chemicalize Pro - Cheminfo Stories 2020 Day 5
 
SOA-C01 Dumps Questions
SOA-C01 Dumps QuestionsSOA-C01 Dumps Questions
SOA-C01 Dumps Questions
 
A Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersA Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and Triggers
 
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18
Woo for You: Customizing WooCommerce - Gary Thayer - WCNYC18
 
Episode 12 - Basics of Trigger
Episode 12 - Basics of TriggerEpisode 12 - Basics of Trigger
Episode 12 - Basics of Trigger
 
How to use New Technology to become more efficient
How to use New Technology to become more efficientHow to use New Technology to become more efficient
How to use New Technology to become more efficient
 
Your Tests Are Not Your Specs
Your Tests Are Not Your SpecsYour Tests Are Not Your Specs
Your Tests Are Not Your Specs
 
ASCENT MANUFACTURING INC
ASCENT MANUFACTURING INCASCENT MANUFACTURING INC
ASCENT MANUFACTURING INC
 
ABControls Project Design & Delivery Steps
ABControls Project Design & Delivery StepsABControls Project Design & Delivery Steps
ABControls Project Design & Delivery Steps
 
A Story of Continuous Integration
A Story of Continuous IntegrationA Story of Continuous Integration
A Story of Continuous Integration
 
Shorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexShorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for Apex
 
Q1 2020 feature roundup - slide deck
Q1 2020 feature roundup - slide deckQ1 2020 feature roundup - slide deck
Q1 2020 feature roundup - slide deck
 
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgt
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgtStilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgt
Stilnest.com: Wie beste Magento-Shop-Performance für zufriedene Kunden sorgt
 
Creating a New Work Order
Creating a New Work OrderCreating a New Work Order
Creating a New Work Order
 

Andere mochten auch

Program for Online Teaching: Personal Learning Networks (2 Feb 2012)
Program for Online Teaching: Personal Learning Networks (2 Feb 2012)Program for Online Teaching: Personal Learning Networks (2 Feb 2012)
Program for Online Teaching: Personal Learning Networks (2 Feb 2012)Lisa M Lane
 
High Medieval Topics: Scholasticism, Architecture, Chivalry
High Medieval Topics: Scholasticism, Architecture, ChivalryHigh Medieval Topics: Scholasticism, Architecture, Chivalry
High Medieval Topics: Scholasticism, Architecture, ChivalryLisa M Lane
 
FOLIO - An open source multi-tenant platform
FOLIO - An open source multi-tenant platformFOLIO - An open source multi-tenant platform
FOLIO - An open source multi-tenant platformAndrew Nagy
 
Lesson No 10 The Oneness Truth
Lesson No  10   The Oneness TruthLesson No  10   The Oneness Truth
Lesson No 10 The Oneness Truthguest22999d
 
Lightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedLightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedSalesforce Developers
 
Coding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part ICoding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part ISalesforce Developers
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Salesforce Developers
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel ProgrammingUday Sharma
 

Andere mochten auch (16)

Deber de anatomia (1)
Deber de anatomia (1)Deber de anatomia (1)
Deber de anatomia (1)
 
精選書摘
精選書摘精選書摘
精選書摘
 
Program for Online Teaching: Personal Learning Networks (2 Feb 2012)
Program for Online Teaching: Personal Learning Networks (2 Feb 2012)Program for Online Teaching: Personal Learning Networks (2 Feb 2012)
Program for Online Teaching: Personal Learning Networks (2 Feb 2012)
 
Deber de anatomia (1)
Deber de anatomia (1)Deber de anatomia (1)
Deber de anatomia (1)
 
Parallel computing
Parallel computingParallel computing
Parallel computing
 
High Medieval Topics: Scholasticism, Architecture, Chivalry
High Medieval Topics: Scholasticism, Architecture, ChivalryHigh Medieval Topics: Scholasticism, Architecture, Chivalry
High Medieval Topics: Scholasticism, Architecture, Chivalry
 
Versions of android
Versions of androidVersions of android
Versions of android
 
FOLIO - An open source multi-tenant platform
FOLIO - An open source multi-tenant platformFOLIO - An open source multi-tenant platform
FOLIO - An open source multi-tenant platform
 
Lesson No 10 The Oneness Truth
Lesson No  10   The Oneness TruthLesson No  10   The Oneness Truth
Lesson No 10 The Oneness Truth
 
Write bulletproof trigger code
Write bulletproof trigger codeWrite bulletproof trigger code
Write bulletproof trigger code
 
Lightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedLightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE Evolved
 
Data mining and knowledge Discovery
Data mining and knowledge DiscoveryData mining and knowledge Discovery
Data mining and knowledge Discovery
 
Coding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part ICoding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part I
 
Diving Into Heroku Private Spaces
Diving Into Heroku Private SpacesDiving Into Heroku Private Spaces
Diving Into Heroku Private Spaces
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
 

Ähnlich wie Unit Testing: Not Just for Apex

Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer Lee
Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer LeeProcess Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer Lee
Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer LeeSalesforce Admins
 
Advanced Test Design Methods
Advanced Test Design MethodsAdvanced Test Design Methods
Advanced Test Design Methodssharon elgarat
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewDhanik Sahni
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1Michael Gill
 
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native Functionality
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native FunctionalityDF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native Functionality
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native FunctionalityJennifer Phillips
 
Universal Analytics Common Issues - MeasureFest
Universal Analytics Common Issues - MeasureFestUniversal Analytics Common Issues - MeasureFest
Universal Analytics Common Issues - MeasureFestdarafitzgerald
 
The Business of Flow - Point and Click Workflow Applications
The Business of Flow - Point and Click Workflow ApplicationsThe Business of Flow - Point and Click Workflow Applications
The Business of Flow - Point and Click Workflow ApplicationsDreamforce
 
DF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringDF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringLuis E. Luciani ☁
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationTechWell
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Vivek Chawla
 
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can UseFive Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can UseSalesforce Developers
 
Фреймворк автоматизированных критериев приёмки
Фреймворк автоматизированных критериев приёмкиФреймворк автоматизированных критериев приёмки
Фреймворк автоматизированных критериев приёмкиSQALab
 
Learn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream managementLearn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream managementLance Knight
 
Enough Blame for System Performance Issues
Enough Blame for System Performance IssuesEnough Blame for System Performance Issues
Enough Blame for System Performance IssuesMahesh Vallampati
 
Process Builder Automation and Considerations
Process Builder Automation and ConsiderationsProcess Builder Automation and Considerations
Process Builder Automation and ConsiderationsSathishkumar Periyasamy
 
20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company
20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company
20181016 Agile DC 2018 Conf Kanban Case Study for Energy CompanyCraeg Strong
 
Sandboxes: The Future of App Development by Evan Barnet & Pam Barnet
Sandboxes: The Future of App Development by Evan Barnet & Pam BarnetSandboxes: The Future of App Development by Evan Barnet & Pam Barnet
Sandboxes: The Future of App Development by Evan Barnet & Pam BarnetSalesforce Admins
 

Ähnlich wie Unit Testing: Not Just for Apex (20)

Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer Lee
Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer LeeProcess Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer Lee
Process Builder is an #AwesomeAdmin's Swiss Army Knife by Jennifer Lee
 
Advanced Test Design Methods
Advanced Test Design MethodsAdvanced Test Design Methods
Advanced Test Design Methods
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1
 
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native Functionality
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native FunctionalityDF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native Functionality
DF2UFL 2012: Workflows: Making the MOST of Salesforce.com Native Functionality
 
Universal Analytics Common Issues - MeasureFest
Universal Analytics Common Issues - MeasureFestUniversal Analytics Common Issues - MeasureFest
Universal Analytics Common Issues - MeasureFest
 
The Business of Flow - Point and Click Workflow Applications
The Business of Flow - Point and Click Workflow ApplicationsThe Business of Flow - Point and Click Workflow Applications
The Business of Flow - Point and Click Workflow Applications
 
DF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringDF19 South-East Florida Global Gathering
DF19 South-East Florida Global Gathering
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber Implementation
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
 
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can UseFive Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
 
Summer '18 Developer Highlights
Summer '18 Developer HighlightsSummer '18 Developer Highlights
Summer '18 Developer Highlights
 
Фреймворк автоматизированных критериев приёмки
Фреймворк автоматизированных критериев приёмкиФреймворк автоматизированных критериев приёмки
Фреймворк автоматизированных критериев приёмки
 
Learn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream managementLearn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream management
 
Enough Blame for System Performance Issues
Enough Blame for System Performance IssuesEnough Blame for System Performance Issues
Enough Blame for System Performance Issues
 
Agile testing
Agile testingAgile testing
Agile testing
 
Process Builder Automation and Considerations
Process Builder Automation and ConsiderationsProcess Builder Automation and Considerations
Process Builder Automation and Considerations
 
20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company
20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company
20181016 Agile DC 2018 Conf Kanban Case Study for Energy Company
 
Sandboxes: The Future of App Development by Evan Barnet & Pam Barnet
Sandboxes: The Future of App Development by Evan Barnet & Pam BarnetSandboxes: The Future of App Development by Evan Barnet & Pam Barnet
Sandboxes: The Future of App Development by Evan Barnet & Pam Barnet
 
DevOps and Audit
DevOps and AuditDevOps and Audit
DevOps and Audit
 

Mehr von Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

Mehr von Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Kürzlich hochgeladen (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Unit Testing: Not Just for Apex

  • 1. Unit Testing More than Apex Testing the Declarative Side of the Salesforce1 Platform ​ Mike Chale ​ Senior Developer ​ @Trifecta ​ @mike_chale ​ 
  • 2. Deliver consistent customer experiences across web, mobile, and eCommerce platforms that are fully integrated into your business systems. ​ 20+ Years developing enterprise solutions, primarily focused on commerce ​ 100+ Salesforce Certifications, including a Salesforce MVP Trifecta Commerce – Available on the AppExchange ​ Native app, streamlines order entry supporting B2B and B2B2C commerce. Top Industries Served: ​ Manufacturing/Distribution ​ CPG/Retail ​ Life Sciences ​ Hospitality and Entertainment Who is Trifecta? Visit our booth – #2021 Moscone North
  • 3. Unit testing has one job . . . Source: https://www.pinterest.com/pin/460141286900183385/
  • 4. 1.  Ensure customizations work as expected 2.  Verify edge cases 3.  Make changes confidently 4.  Preserve knowledge Why Unit Test?
  • 5. When I saw the light. . . ​ . . . this was step 1 of a 3 step field update process
  • 6. 1.  Change Management 2.  Declarative features replacing code 3.  Save time Why Unit Test Metadata?
  • 7. 1.  Verify sObject rules 1.  Required fields 2.  Lookup filters 3.  Validation rules Unit Testing Metadata
  • 8. §  Leads are converted without contact information! §  Need company size on Lead for classification §  Accounts have their Key Contact outside of the company Sample Request #1
  • 10. 1.  Verify sObject rules 2.  Verify critical processes Unit Testing Metadata
  • 11. 1.  Are the entry criteria working as expected? 2.  Is it going to the correct person/people? 3.  Check all branches Verifying Approval Processes
  • 12. §  All “big deals” need to be approved §  Deals worth at least $50,000 go to manager §  Deals over $100,000 require secondary approval Sample Request #2
  • 13. Demo
  • 14. 1.  Verify sObject rules 2.  Verify critical processes 3.  Verify complex Process Builder 1.  Post to Chatter 2.  Auto-submit Approval Unit Testing Metadata
  • 15. §  Processes can have multiple branches §  Each branch can perform multiple steps §  Post to Chatter §  Update self / related records §  Submit for Approval §  Invoke Apex and Flows Testing Process Builder
  • 16. §  Approval Process is great! §  Can the Opportunity be submitted automatically? §  And @mention the manager Sample Request #3
  • 17. Demo
  • 18. 1.  Verify sObject rules 2.  Verify critical processes 3.  Verify complex Process Builder 1.  Post to Chatter 2.  Auto-submit Approval 3.  Update and create records Unit Testing Metadata
  • 19. §  Need reminders! §  Can we automatically convert an Opportunity to an Order? §  And create the Contract? Sample Request #4
  • 20. Demo
  • 21. §  Complex orgs have many interactions §  Workflows and Process Builder can be complex §  Save time with regression testing Recap
  • 22. §  Presentation and sample code - https://github.com/chalemic/UnitTestingMoreThanApex §  How to Write Good Unit Tests - https://developer.salesforce.com/page/How_to_Write_Good_Unit_Tests §  Testing Best Practices - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_testing_best_practices.htm §  Apex Approval Processing Example - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_process_example.htm §  Apex Lead Convert Class - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_dml_convertLead.htm Resources