[SalesForce] Deploy Process Builder as Active – Test Coverage Requirement Clarification

We're looking at activating the setting to deploy active processes and flows using the Metadata API.

When looking at the requirements, Winter 19 release notes says:

When you deploy an active process or flow in a production org,
Salesforce runs your org’s Apex tests and confirms that enough of your
processes and flows have test coverage. Specifically, the Apex tests
must launch at least 75% of the total number of active processes and
active autolaunched flows in your org

If I had 100 active process builders in an org:

  1. Is the requirement that I have apex test methods that launch 75 of
    them (could cover only 10% of each of them individually)

or

  1. Is the requirement that every active process builder has coverage
    for 75% of their individual elements which you can query through
    FlowTestCoverage.

Best Answer

The flow coverage requirement (default 75%) applies on a per flow basis - based on a test I ran last week

  • Enabled the Deploy Flows as Activated in the target PROD org
  • Deployed a new flow from sandbox + corresponding apex testclass
  • Ran all tests (note that other flows and process builders did not have test classes to cover their logic paths)

As the new flow had test coverage, it deployed as activated.

Related Topic