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
anna425912anna425912 

Do things other than Apex Classes and Triggers (such as flows/process builder) count towards code coverage?

We are currently unable to deploy any change sets because our current code coverage is at 72%.  I have tested deploying just a single field on an almost untouched object and get the 72%. I'm wondering how can production get below 75% if all classes and test classes have to be deployed and they won't be deployed if it causes code coverage to go below 75%.  Is it possible that Flows or Process Builder, which can just be created in production, count towards code coverage? 
NagaNaga (Salesforce Developers) 
Dear Anna,

We would like to inform to you that neither the flows nor the process would contribute to the code coverage in your program.These are the feature of the CRM and are "point and click".

Best Regards
Naga kiran
anna425912anna425912
Hi Naga, 

Thanks for letting me know.  Are you able to explain how the code coverage can decrease with point and click changes in production? 
JWykelJWykel
Don't you love when this happens anna425912? We've experienced it a few times as well. Validation rule changes or other similar things can cause some tests to fail. There's other reasons for it to happen, too, but I don't have the time to research that right now.

My best recommendation would be to go on to your production environment, open the Developer Console and click on the Tests tab.  Here you can see the overrall code coverage.  Find classes that are low % and get coverage written in sandbox. Once you have a batch of classes to increase coverage, deploy them all to get above the 75% mark.

My rule for my team is that a 90%+ is required to be considered 'OK'. That level will allow room for 'quick fix' deployments where test cases haven't been written yet, etc.