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
kanavkhuranakanavkhurana 

Test class included in coverage?

Hi All,

I have a Utility Class, 'TestDataGenerator' for generating test records. I have applied the '@isTest' annotation to this class. However, it's showing up in the overall code coverage (see screenshot below). As I understand, Test classes themselves are not included in the overall code coverage calculation. Please help!

User-added image

User-added image
Virendra ChouhanVirendra Chouhan
Hi kanavkhurana,

can you send me your Code sample?

Because i think you are calling any other class under this TestDataGenerator.
kanavkhuranakanavkhurana
Hi Virendra,

Thanks for the tip! :)
I've checked the code and there are no calls to any other classes. Unfortunately, as per my company's IP policy, it will not be possible for me to share a code sample.