Description
Course info
Level
Beginner
Updated
Jul 21, 2017
Duration
1h 43m
Description

Play by Play is a series in which top technologists work through a problem in real time, unrehearsed and unscripted. In this course, Play by Play: Salesforce Admin Essential Testing Techniques, Bonny Hinners and Don Robins explore best practices and tips and tricks for how to use the Apex unit testing framework to validate that any org’s specific business processes are still working. Learn how to build flexible and dynamic data factories, approaches for testing user specific data and complex validation rules, and how to stress test high volume relational data. By the end of this course, you’ll be empowered with the tools to keep watch on your org’s automation processes.

About the author
About the author

Bonny is a Salesforce certified developer, administrator, and consultant. She helps non-profit organizations implement and customize Salesforce to meet the goals of their organizations. In 2013 , Bonny was selected as a Salesforce MVP in recognition of her leadership in the Salesforce community.

More from the author
About the author

Don Robins is a well known Salesforce MVP, instructor, author, and speaker. A custom business application developer for more decades than he cares to admit, he focuses on Salesforce technical instruction and knowledge sharing.

More from the author
More courses by Don Robins
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Welcome to this Salesforce Play by Play with Pluralsight. Salesforce Play by Play is an interactive series where we sit down with Salesforce experts, such as MVPs, consultants, developers, and architects to discuss common challenges faced everyday by Salesforce customers. We'll be learning while discussing concepts and debating tradeoffs on various approaches to solving real world problems. We learn by reviewing system configurations or writing code, and then exploring the benefits of any particular solution. In this course, we challenge Salesforce MVP Bonnie Hinners to show us how to use automated testing to help manage your org's health on an ongoing basis. Bonnie shows us her practices, tips, and tricks for how to use the Apex unit testing framework to validate that any org's specific business processes are still working, especially when it comes to declarative automation, such as workflow, validation rules, and processes. We're not just talking about Apex. Along the way, Bonnie shows us how to build flexible and dynamic data factories, discusses approaches for testing user and profile specific data, and complex validation rules, as well as how to stress test high volume relational data and much more. Whether you're an admin or a developer, come learn these practical tips and tricks to help keep watch on your org's automation processes. Please join us for Admin Testing Essentials. We hope you enjoy it.

Shaping Better Test Data
So that's the great thing about this Test. loadData class and method, you can use it with any kind of object, you can create the data. There's some caveats about the data though so let's take another look at what the data might look like, because you think, oh wow, if I can create data, I just want to do an export and have all my data from my Salesforce org. No, don't do that, do not do that, because you don't want things like the last modified date, the isDelete field, well you could theoretically want the isDelete field if you're checking on the undelete option trigger that fires when you undelete something, so then you do want to actually insert some deleted records. But it's very flexible, you can choose to do it or not. Right, but for most of your data you probably don't want to insert it with the isDelete field, it's not necessary. So your CSV file only needs to contain those fields that you care to populate. You don't have to worry about the fields that you don't want to populate. Exactly. So you can have a very narrow set of fields? Yes, but you want to make it reflective of your business right? So if you've got validation rules, make it reflective of that so that you can test that those validation rules are being observed, and I've got my data here, it includes website facts, and --- So you can use the data in here for any kind of verification that the data was created properly or if the data is improper, you can cause it to actually catch something that's wrong, is that correct? Yeah, we'll take a look at that later too, and I'm going to open up the opportunities because it has some interesting data in it.