function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Agustina GarciaAgustina Garcia 

FlowElementTestCoverage

Per Salesforce documentation, FlowTestCoverage and FlowElementTestCoverage will help us to determine if my Lightning Flows coverage is 75% at least.
But my question is about the beheviour, as I'm not sure if I'm not understanding documentation or I'm doing something wrong.

If I run the query
SELECT Id, 
     ApexTestClassId, 
     TestMethodName, 
     FlowVersionId, 
     NumElementsCovered, 
     NumElementsNotCovered 
 FROM FlowTestCoverage
I get the inforamtion of all Lightning flows that I have covereged. Howerver I'm confused with Elements fields. Reading this (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowelementtestcoverage.htm) I understand that Elements are every single "box" on my flow, so if I have a visual flow like this one
User-added imageI would expect to get as a result the sum of NumElementsCovered and NumElementsNotCovered would be 4 (every single box on my flow) 

Same, if I run this query
SELECT Id, Elementname, FlowTestCoverageId 
FROM FlowElementTestCoverage 
WHERE FlowVersionId='theSFId'
I would also expect to get 4 records. Instead I get 1 record related to reservationEmail and first query returns also 1. 

Is it a misunderstanding on documentation? or Is it anything wrong on my org?

Thanks!