Don't Forget About Testing as you Migrate to Flow
Brian Shea
Salesforce Architect, Independent Consultant // 17x Certified // Dreamforce, TDX Speaker
One of my favorite Salesforce people on social media is Jodi Hrbek and she recently wrote a great LinkedIn post on migrating to Flow.?
Here's a link to her post
Adding to her list of considerations, Testing is going to be an important (and probably too often overlooked) part of the migration effort. With that in mind, here are a few of the considerations for structuring your testing efforts as you migrate your Salesforce org to Flow. (And if you're wondering what all this "migrating to Flow" stuff is about: Elements.cloud has an excellent article on the topic).
1. Scope of this Article: Test Case Definition
This article will focus on test case definition (specifically Functional Test Cases) for migrating legacy automations (like workflow rules & process builders) to Flow. This article will not focus on the various ways test cases may be executed (manually, via automation, etc):
2. Assessing Risk
In order to determine your testing needs, you should consider your automations along two dimensions: Complexity and Business Impact.
These dimensions are relative, but the higher the complexity and larger the possible business impact, the more you should be testing. It isn't feasible to test every possible scenario so focusing on Complexity and Business Impact will give you a lens through which to prioritize your testing efforts.
领英推荐
3. Focus on Functional Testing
For many Salesforce orgs, Functional Testing will be the core type of testing needed for migrating legacy automations to Flow. Functional Testing is all about testing business scenarios and making sure that a given input yields the intended business output.
Functional Tests should be understood by business users and technical users, so they also can be a useful tool for communicating scope of effort, achieving consensus, and getting input across tech and business teams.
4. An Example
Let’s say we’re working on a Salesforce org for a University. And they have a legacy automation that creates a task when a Student registers for a Business course. We need to create a Flow that will replace this legacy automation. Here's the spec of the use case:
Here is an example of a few basic functional test cases that could be used to test the logic above. Notice that the Criteria and Expected Outcome are broken out to separate the triggering conditions/criteria (the input) from the Expected Outcome (the output).
5. Types of Functional Tests
As you write your test cases, consider the following types of functional tests:
Testing: An Important Part of the Journey to Flow Town
Like Jodi said in her post: us in the Salesforce community are on the road to Flow Town. There's a ton of energy in the community behind having a single, (very) robust declarative automation tool. Testing will be an important part of the migration effort by increasing expected outcomes and minimizing unexpected outcomes and their impact. It's also likely that writing test cases may help you write better Flows and consider scenarios/criteria that you might not otherwise.
While testing is easy to overlook, a well thought out and executed test strategy will pay dividends for your users (everything will work as expected!) and for you (fewer support requests and more happy users!).
Ask to Uncover? Question Workshop | Helping Tech Teams & Consultants Deliver the Right Solution Through Better Questions | Corporate Trainer & Speaker | Author of Amazon Bestseller, 'Rock Your Role as a Salesforce Admin'
2 年Thanks for the shoutout and, more important, the content! We need more on this topic!