Build Tests Automatically with Flow Test Builder

This extension includes a flow that will generate Apex test classes for a selected target flow. A good example and use case is shown in this video:

Autolaunched Flows can be launched via a REST or Apex call. That means that you can create tests that invoke the flows, passing in specified inputs, and inspect the outputs from the Flow to see if it’s returning the expected result.

This Flow Autotest package installs a flow called Flow Test Generator. When you run it, you’re asked first if you want to Add, Edit or Delete a FlowTest. FlowTest is a Custom Object that stores the information specific to one test and its assertions:

Creating a new test involves first selecting the target flow, which must be an Autolaunched flow:

For each test, configure the desired combination of flow input values:

Then define the tests you want to run on the resulting flow output values:

The test class will then be generated. At this time, you have to add it manually to your org using Developer Console.


Prerequisite: This app requires Flow Actions Base Pack (v3.11+) and Flow Screen Components Base Pack (3.0.18+). You can install them here.

2/26 V3.0 Production Sandbox – Works with V3 Action and Screen Components Base Pack versions.

Source Code

view source

Old Versions

Version 1.0.2 Unlocked 9/3/21

Version 1.0 Unlocked 7/19/20