SlideShare a Scribd company logo
WEBINAR: Proven Patterns for Loading Test Data for Managed Package Testing
● Who is CodeScience?
● Introductions
● Let’s Define “Test Data”
● Methods of Loading Test Data
● Recap
Agenda
This is an image placeholder for an image.
Please size accordingly.
● Founding partner of the Salesforce Product
Development Organization (PDO) Program since
2008 - named Master PDO in 2017
● PDO Program provides app development
services to ISVs for the Salesforce AppExchange
● Partner with clients in various industries to
assist in building over 220 apps on the
AppExchange
● From design to build to implementation, we
support through the full lifecycle
Who is CodeScience
Client success: 10% of the AppExchange
CodeScience client focus:
Today’s Speakers:
Bobby Tamburrino
Lead Salesforce Developer
CodeScience
Let’s Define “Test Data”
What Do We Mean When We Say “Test Data”?
● Records that reflect what production data could look like
● Each record vetted by either QA or an SME
● Small subset of records to allow for rapid loading into new
environments
● Records that have fleshed out and accurate relationships with other
records
What Do We NOT Mean When We Say “Test Data”?
● A full copy of a production instance with user-created data
● Data that has no relevance to the app’s functionality or intended use
● Data for Unit Tests
Those Who Benefit From Proper Test Data
● QA - Quicker startup time on end-to-end or regression testing with
vetted data
● DevOps - Easier spin-up of orgs with relevant data
● Developers - Able to develop against realistic data without having to
create it themselves
Dirty Little Secret About Developers
Dirty Little Secret About Developers
When To Define Your Test Data
● At the time of object creation
● As new features are developed
● As new test cases are defined
● As features or objects are deprecated
Methods of Loading Test Data
Data Loader
● Windows or MacOS Application
● Utilizes CSV Files
● Needs no custom development
● UI for mapping CSV fields to Salesforce fields
Downsides:
● Requires user input each time
● Not automated, so Continuous Integration can’t use it
○ There is a command line tool for Windows, but most CI is *nix based
Bulk API (2.0)
● Can be called with SalesforceDX, Workbench, or directly via the REST API
● Utilizes CSV files
● Acts asynchronously as a batch job
● Can handle large data sets (up to 150MB)
Downsides:
● Need custom development to create job, and poll API for success/failure
● CSV sometimes harder to read for developers used to JSON data structures
● Master-Detail relationships require editing CSV files with Id’s
Bulk API (2.0)
Processing data typically consists of the following steps:
1. Create a new job that specifies the object and action.
2. Send data to the server in a number of batches.
3. Once all data has been submitted, close the job. Once closed, no more batches can be sent
as part of the job.
4. Check status of all batches at a reasonable interval. Each status check returns the state of
each batch.
5. When all batches have either completed or failed, retrieve the result for each batch.
6. Match the result sets with the original data set to determine which records failed and
succeeded, and take appropriate action.
Bulk API (2.0)
Processing data typically consists of the following steps:
1. Create a new job that specifies the object and action.
2. Send data to the server in a number of batches.
3. Once all data has been submitted, close the job. Once closed, no more batches can be sent
as part of the job.
4. Check status of all batches at a reasonable interval. Each status check returns the state of
each batch.
5. When all batches have either completed or failed, retrieve the result for each batch.
6. Match the result sets with the original data set to determine which records failed and
succeeded, and take appropriate action.
SalesforceDX Data Tree Import/Export
● Called with SalesforceDX Commands
● Utilizes JSON files
● Can handle up to 200 records with Master-Detail and Lookup relationships at once
● Can insert multiple objects at once with a plan file
Downsides:
● Complex relationships between records might break record limit
● Must be able to query all data with one SOQL statement from top-down
● Does not handle records that have lookups to records in same object
● Does not handle lookups to User records
● Cannot import records with different Record Types
Custom Solution
● Apex Class that reads from a Static Resource of JSON files
○ Info file denotes what namespace an object lives in and what object a lookup has
● External ID field on all records to upsert against
● Namespace appending on fields at runtime, if needed
● Queries at runtime to match External ID’s to their fields:
○ External ID Field on target object a Lookup or Master/Detail relationship
○ Federation ID Field on User object for a Lookup to User
○ DeveloperName Field on RecordType to assign a Record Type
● Upsert, not insert, so rerunning doesn’t create duplicate data
In Summary...
● Create and Identify Test Data early
● Iterate on the Test Data as development continues
● If possible, add to Continuous Integration (or org creation scripts) to
give developers access to good data
● Complex data might require a custom data loading solution - budget
that in to your estimates!
Contact Us:
Thank You
info@codescience.com

More Related Content

What's hot (20)

PPTX
ATAGTR2017 Performance Testing of Big Data Application
Agile Testing Alliance
 
PDF
Assuring the code quality of share point solutions and apps - Matthias Einig
SPC Adriatics
 
PPTX
Into to GraphQL
shobot
 
PDF
(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2
Microsoft Argentina y Uruguay [Official Space]
 
PPTX
SPSNL17 - Getting notified by SharePoint with the webhook functionality - Eli...
DIWUG
 
PPTX
OpenRefine Tutorial
Alex Petralia
 
PDF
Pycon Talk
Abhijit Gadgil
 
PPTX
Domain Driven Design in Rails
Hans Yu
 
PPTX
Introduction to graphQL
Muhilvarnan V
 
PDF
Introduction to GraphQL
Sangeeta Ashrit
 
PPTX
Taking Control of your Data with GraphQL
Vinci Rufus
 
PDF
REST vs GraphQL
Squareboat
 
PDF
Initial Usage Analysis of DBpedia's Triple Pattern Fragments
Ruben Verborgh
 
PDF
[CB19] API-induced SSRF: How Apple Pay Scattered Vulnerabilities Across the W...
CODE BLUE
 
PPTX
OpenRefine Class Tutorial
Ashwin Dinoriya
 
PDF
Live DBpedia querying with high availability
Ruben Verborgh
 
PDF
Sustainable queryable access to Linked Data
Ruben Verborgh
 
PPTX
Make Text Search "Work" for Your Apps - JavaOne 2013
javagroup2006
 
PDF
Graphql
Neven Rakonić
 
PDF
Manipulating Web Application Interfaces
Felipe M
 
ATAGTR2017 Performance Testing of Big Data Application
Agile Testing Alliance
 
Assuring the code quality of share point solutions and apps - Matthias Einig
SPC Adriatics
 
Into to GraphQL
shobot
 
(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2
Microsoft Argentina y Uruguay [Official Space]
 
SPSNL17 - Getting notified by SharePoint with the webhook functionality - Eli...
DIWUG
 
OpenRefine Tutorial
Alex Petralia
 
Pycon Talk
Abhijit Gadgil
 
Domain Driven Design in Rails
Hans Yu
 
Introduction to graphQL
Muhilvarnan V
 
Introduction to GraphQL
Sangeeta Ashrit
 
Taking Control of your Data with GraphQL
Vinci Rufus
 
REST vs GraphQL
Squareboat
 
Initial Usage Analysis of DBpedia's Triple Pattern Fragments
Ruben Verborgh
 
[CB19] API-induced SSRF: How Apple Pay Scattered Vulnerabilities Across the W...
CODE BLUE
 
OpenRefine Class Tutorial
Ashwin Dinoriya
 
Live DBpedia querying with high availability
Ruben Verborgh
 
Sustainable queryable access to Linked Data
Ruben Verborgh
 
Make Text Search "Work" for Your Apps - JavaOne 2013
javagroup2006
 
Manipulating Web Application Interfaces
Felipe M
 

Similar to WEBINAR: Proven Patterns for Loading Test Data for Managed Package Testing (20)

PPT
Importing data to salesforce
NetStronghold
 
PPT
Data Management and Migration in Salesforce
Sunil kumar
 
PPTX
LDV.pptx
Shams Pirzada
 
PPTX
LDV-v2.pptx
Shams Pirzada
 
PDF
Handling of Large Data by Salesforce
Thinqloud
 
PPTX
SFDC Data Loader
Sujit Kumar
 
PPTX
SFDC Database Basics
Sujit Kumar
 
PPTX
Sales forcedemo
Raj Kumar Ranabhat
 
PPTX
Taking Apex and Visualforce Above and Beyond
Salesforce Developers
 
PPTX
Large Data Management Strategies
Salesforce Developers
 
PDF
Scripted Data Loads with Salesforce DataLoader and ANT
Salesforce Developers
 
PPT
Df12 Performance Tuning
Stuart Bernstein
 
PDF
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Codemotion
 
PPTX
February 2020 Salesforce API Review
Lydon Bergin
 
PPTX
Solving Complex Data Load Challenges
Sunand P
 
PPTX
Large Data Volume Salesforce experiences
Cidar Mendizabal
 
PDF
Diagramming Salesforce Solutions: Matthew Morris - Jacksonville Architects - ...
A. Engin Utkan
 
PPTX
New Powerful API Enhancements for Summer '15
Salesforce Developers
 
PPTX
Salesforce winter’13 release
Karanraj Sankaranarayanan
 
PDF
Way #5 Don’t end up in a ditch because you weren’t aware of roadblocks in you...
panagenda
 
Importing data to salesforce
NetStronghold
 
Data Management and Migration in Salesforce
Sunil kumar
 
LDV.pptx
Shams Pirzada
 
LDV-v2.pptx
Shams Pirzada
 
Handling of Large Data by Salesforce
Thinqloud
 
SFDC Data Loader
Sujit Kumar
 
SFDC Database Basics
Sujit Kumar
 
Sales forcedemo
Raj Kumar Ranabhat
 
Taking Apex and Visualforce Above and Beyond
Salesforce Developers
 
Large Data Management Strategies
Salesforce Developers
 
Scripted Data Loads with Salesforce DataLoader and ANT
Salesforce Developers
 
Df12 Performance Tuning
Stuart Bernstein
 
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Codemotion
 
February 2020 Salesforce API Review
Lydon Bergin
 
Solving Complex Data Load Challenges
Sunand P
 
Large Data Volume Salesforce experiences
Cidar Mendizabal
 
Diagramming Salesforce Solutions: Matthew Morris - Jacksonville Architects - ...
A. Engin Utkan
 
New Powerful API Enhancements for Summer '15
Salesforce Developers
 
Salesforce winter’13 release
Karanraj Sankaranarayanan
 
Way #5 Don’t end up in a ditch because you weren’t aware of roadblocks in you...
panagenda
 
Ad

More from CodeScience (20)

PDF
Journey Through the AppExchange: Product-Led Growth with MagicRobot
CodeScience
 
PDF
Journey Through the AppExchange: From SI to ISV with Virsys12
CodeScience
 
PDF
Leveraging Dynamic Interactions on Salesforce Lightning Pages
CodeScience
 
PDF
Strategic Partnerships: The New Key to Innovation
CodeScience
 
PDF
Journey Through the AppExchange: How inriver is Filling a Gap for Salesforce ...
CodeScience
 
PDF
Designing Salesforce Platform Events
CodeScience
 
PDF
Ready, Set, Launch: Accelerating Healthcare Innovation One App at a Time
CodeScience
 
PDF
Journey Through the AppExchange: How Place Technology Created a New Category
CodeScience
 
PDF
Journey to the AppExchange: How to Launch Into a New Ecosystem
CodeScience
 
PDF
10 Tips to Pass Salesforce Security Review (and Steps to Take If You Don’t!)
CodeScience
 
PDF
Top 5 Ways to Build Pipeline With AppExchange Chat
CodeScience
 
PDF
Everything You Need to Know About Salesforce LMA & COA
CodeScience
 
PDF
Streamline Page Layouts with Dynamic Forms
CodeScience
 
PDF
Getting to Yes: How to build executive alignment to win big on the AppExchange
CodeScience
 
PDF
Org-dependent Unlocked Packages for ISVs
CodeScience
 
PDF
Ready, Set, Deploy: How Place Technology Streamlined Deployment on the AppExc...
CodeScience
 
PDF
How FinancialForce Leverages Labs to Accelerate Innovation
CodeScience
 
PPTX
Acting Like a Top 25 Salesforce ISV: How Appinium Applies Buyer's and Seller'...
CodeScience
 
PDF
ISV Error Handling With Spring '21 Update
CodeScience
 
PDF
Acting Like a Top 25 Salesforce ISV: Designing the Seller's Journey for the ...
CodeScience
 
Journey Through the AppExchange: Product-Led Growth with MagicRobot
CodeScience
 
Journey Through the AppExchange: From SI to ISV with Virsys12
CodeScience
 
Leveraging Dynamic Interactions on Salesforce Lightning Pages
CodeScience
 
Strategic Partnerships: The New Key to Innovation
CodeScience
 
Journey Through the AppExchange: How inriver is Filling a Gap for Salesforce ...
CodeScience
 
Designing Salesforce Platform Events
CodeScience
 
Ready, Set, Launch: Accelerating Healthcare Innovation One App at a Time
CodeScience
 
Journey Through the AppExchange: How Place Technology Created a New Category
CodeScience
 
Journey to the AppExchange: How to Launch Into a New Ecosystem
CodeScience
 
10 Tips to Pass Salesforce Security Review (and Steps to Take If You Don’t!)
CodeScience
 
Top 5 Ways to Build Pipeline With AppExchange Chat
CodeScience
 
Everything You Need to Know About Salesforce LMA & COA
CodeScience
 
Streamline Page Layouts with Dynamic Forms
CodeScience
 
Getting to Yes: How to build executive alignment to win big on the AppExchange
CodeScience
 
Org-dependent Unlocked Packages for ISVs
CodeScience
 
Ready, Set, Deploy: How Place Technology Streamlined Deployment on the AppExc...
CodeScience
 
How FinancialForce Leverages Labs to Accelerate Innovation
CodeScience
 
Acting Like a Top 25 Salesforce ISV: How Appinium Applies Buyer's and Seller'...
CodeScience
 
ISV Error Handling With Spring '21 Update
CodeScience
 
Acting Like a Top 25 Salesforce ISV: Designing the Seller's Journey for the ...
CodeScience
 
Ad

Recently uploaded (20)

PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Python basic programing language for automation
DanialHabibi2
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 

WEBINAR: Proven Patterns for Loading Test Data for Managed Package Testing

  • 2. ● Who is CodeScience? ● Introductions ● Let’s Define “Test Data” ● Methods of Loading Test Data ● Recap Agenda
  • 3. This is an image placeholder for an image. Please size accordingly. ● Founding partner of the Salesforce Product Development Organization (PDO) Program since 2008 - named Master PDO in 2017 ● PDO Program provides app development services to ISVs for the Salesforce AppExchange ● Partner with clients in various industries to assist in building over 220 apps on the AppExchange ● From design to build to implementation, we support through the full lifecycle Who is CodeScience
  • 4. Client success: 10% of the AppExchange
  • 6. Today’s Speakers: Bobby Tamburrino Lead Salesforce Developer CodeScience
  • 8. What Do We Mean When We Say “Test Data”? ● Records that reflect what production data could look like ● Each record vetted by either QA or an SME ● Small subset of records to allow for rapid loading into new environments ● Records that have fleshed out and accurate relationships with other records
  • 9. What Do We NOT Mean When We Say “Test Data”? ● A full copy of a production instance with user-created data ● Data that has no relevance to the app’s functionality or intended use ● Data for Unit Tests
  • 10. Those Who Benefit From Proper Test Data ● QA - Quicker startup time on end-to-end or regression testing with vetted data ● DevOps - Easier spin-up of orgs with relevant data ● Developers - Able to develop against realistic data without having to create it themselves
  • 11. Dirty Little Secret About Developers
  • 12. Dirty Little Secret About Developers
  • 13. When To Define Your Test Data ● At the time of object creation ● As new features are developed ● As new test cases are defined ● As features or objects are deprecated
  • 14. Methods of Loading Test Data
  • 15. Data Loader ● Windows or MacOS Application ● Utilizes CSV Files ● Needs no custom development ● UI for mapping CSV fields to Salesforce fields Downsides: ● Requires user input each time ● Not automated, so Continuous Integration can’t use it ○ There is a command line tool for Windows, but most CI is *nix based
  • 16. Bulk API (2.0) ● Can be called with SalesforceDX, Workbench, or directly via the REST API ● Utilizes CSV files ● Acts asynchronously as a batch job ● Can handle large data sets (up to 150MB) Downsides: ● Need custom development to create job, and poll API for success/failure ● CSV sometimes harder to read for developers used to JSON data structures ● Master-Detail relationships require editing CSV files with Id’s
  • 17. Bulk API (2.0) Processing data typically consists of the following steps: 1. Create a new job that specifies the object and action. 2. Send data to the server in a number of batches. 3. Once all data has been submitted, close the job. Once closed, no more batches can be sent as part of the job. 4. Check status of all batches at a reasonable interval. Each status check returns the state of each batch. 5. When all batches have either completed or failed, retrieve the result for each batch. 6. Match the result sets with the original data set to determine which records failed and succeeded, and take appropriate action.
  • 18. Bulk API (2.0) Processing data typically consists of the following steps: 1. Create a new job that specifies the object and action. 2. Send data to the server in a number of batches. 3. Once all data has been submitted, close the job. Once closed, no more batches can be sent as part of the job. 4. Check status of all batches at a reasonable interval. Each status check returns the state of each batch. 5. When all batches have either completed or failed, retrieve the result for each batch. 6. Match the result sets with the original data set to determine which records failed and succeeded, and take appropriate action.
  • 19. SalesforceDX Data Tree Import/Export ● Called with SalesforceDX Commands ● Utilizes JSON files ● Can handle up to 200 records with Master-Detail and Lookup relationships at once ● Can insert multiple objects at once with a plan file Downsides: ● Complex relationships between records might break record limit ● Must be able to query all data with one SOQL statement from top-down ● Does not handle records that have lookups to records in same object ● Does not handle lookups to User records ● Cannot import records with different Record Types
  • 20. Custom Solution ● Apex Class that reads from a Static Resource of JSON files ○ Info file denotes what namespace an object lives in and what object a lookup has ● External ID field on all records to upsert against ● Namespace appending on fields at runtime, if needed ● Queries at runtime to match External ID’s to their fields: ○ External ID Field on target object a Lookup or Master/Detail relationship ○ Federation ID Field on User object for a Lookup to User ○ DeveloperName Field on RecordType to assign a Record Type ● Upsert, not insert, so rerunning doesn’t create duplicate data
  • 21. In Summary... ● Create and Identify Test Data early ● Iterate on the Test Data as development continues ● If possible, add to Continuous Integration (or org creation scripts) to give developers access to good data ● Complex data might require a custom data loading solution - budget that in to your estimates!