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
Suresh Kumar Arjunan1Suresh Kumar Arjunan1 

Does TestDataFactory classes need to covered as part of code coverage?

I understand TestDataFactory classes won't be counted against org limit and i would like to whether code coverage has to be done separately for these classes. 

Looking for help and example if any.
Best Answer chosen by Suresh Kumar Arjunan1
ManojjenaManojjena
Hi Suresh Kumar,
if you will declare @isTest for TestDataFactory  class then code coverage is not required .
I think this will help you.
Thanks
Manoj

All Answers

ManojjenaManojjena
Hi Suresh Kumar,
if you will declare @isTest for TestDataFactory  class then code coverage is not required .
I think this will help you.
Thanks
Manoj
This was selected as the best answer
Suresh Kumar Arjunan1Suresh Kumar Arjunan1
If i go with that assumption then overall code coverage is reduced and it is showing 0% code coverage for this testdatafactory class. Is this fine?
Robert_StrunkRobert_Strunk
Suresh, 
   You can ignore the 0% number.  I have had the same issue but the code is still able to get pushed to production.  
Suresh Kumar Arjunan1Suresh Kumar Arjunan1
great thanks !!!