FlowElementTestCoverage

Represents a flow element that was executed by a given Apex test method. Available in API version 44.0 and later.

Supported SOAP Calls

query(), delete(), retrieve(), update()

Supported REST HTTP Methods

GET, HEAD

Fields

Field Details
ElementName
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
The unique name of the flow element that’s executed by the test method.
FlowTestCoverageId
Type
ID
Properties
Filter, Group, Sort
Description
The ID of the parent FlowTestCoverage record.
FlowVersionId
Type
ID
Properties
Filter, Group, Sort, Update
Description
The ID of the flow version that’s executed by the test method.

Usage

FlowElementTestCoverage records are deleted when changes are saved to the associated flow version.

A flow version corresponds to a process built in Process Builder or a flow built in Flow Builder. When you create a process, Salesforce names each element for you. To understand which criteria node or action corresponds with an element name, see Troubleshoot Processes with Apex Debug Logs.

Tip

Sample Queries

Get the executed elements that were executed by any test

SELECT Id, Elementname, FlowTestCoverageId 
FROM FlowElementTestCoverage 
WHERE FlowVersionId='301RM0000004GiK'

Get the number of elements that were executed by any test

SELECT count_distinct(ElementName) 
FROM FlowElementTestCoverage 
WHERE FlowVersionId='301RM0000004GiK'

Get the names of the elements that were executed by any test

SELECT ElementName, count(Id) 
FROM FlowElementTestCoverage 
WHERE FlowVersionId='301RM0000004GiK' 
GROUP BY ElementName