1

With Spring 19 release we would need to have test coverage for flows as well. The question i had was how do we find out which flows which need coverage?

Would flows mean just the visual flow or it includes workflows and process builders?

Update : Can we query for flows which require test coverage. i dont mind writing test classes for them. Just need to know for which ones we need to write atleast to get the current changeset out.

I dont have any flows or processes which are part of the changeset that is been pushed to production

UPDATE: Looks like this error message keeps coming up if there are any other error while deployment like a test class failure or a code coverage issue on other triggers/classes. But when you clear off the other errors then this "Test coverage of active processes...." error would also go off

  • I hope ProcessBuilders are included. Our PM just had us create test classes for all of them... – Florian Heer Feb 13 at 13:34
  • i hope its only process builders and not workflows. I would need to create test classes for lot of them :( – Prady Feb 13 at 13:40
  • visual workflows are definitely not included. I would think - but that's an assumption - that it's only automated flows. – Florian Heer Feb 13 at 13:46
1

Looks like this error comes up with other errors like test class failure or code coverage on other apex classes or triggers.

If you get this error even if you dont have any processes in the package then best ignore it and clear of the other errors and try deploying your changeset. This should go through. Spent a lot of time trying to resolve something which never existed

0

It covers Process Builder and autolaunched Flows, but not Screen Flows or Workflow Rules. From the Winter '18 release notes:

In production orgs, a new setting lets you deploy a new active version of a process or flow via change sets or Metadata API. This setting doesn't appear in non-production orgs (such as scratch, sandbox, and developer orgs), because you can always deploy a new active version.

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.

(Emphasis mine).

Spring '19 introduces some enhancements to how you can test processes and flows, and also allows you to track coverage more easily:

If your org uses Apex tests to validate processes and autolaunched flows, you’re probably interested in knowing what your flow test coverage is. We’re introducing two Tooling API objects that you can query to calculate test coverage for processes and autolaunched flows.

(Emphasis also mine).

If you're not using the new tool to deploy Flows as active, you don't need to worry about coverage level.

  • 1
    Thats interesting... i am not pushing any new flows or processes on my changeset but still get this error on deployment. – Prady Feb 13 at 14:15
  • Are you pushing updated Flows or Processes? Have you activated the setting in production that allows for deployment of active Flows and Processes? – David Reed Feb 13 at 16:07
  • No.. just a few custom objects and triggers – Prady Feb 14 at 3:03
  • I found this article which exactly answers your question. developer.salesforce.com/docs/… – Aryansh04 Feb 14 at 21:44

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.