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
Rajendra Prasad 44Rajendra Prasad 44 

Help For Test Classes

I wrote a test for the trigger, which is covering all its dependency classes(apex cls, Schedule). so do I need to write separate test classes for each dependency cls as well? 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Rajendra Prasad,

On running the test class you have written if the code coverage if it covers all the multiple handler classes then I don't think there is a necessary to write separate test classes again you can check the below link that has the best practices that are mentioned:


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

The focus should be on ensuring that all the test scenarios(both negative and positive) are covered. It really does not matter if you have one to one mapping between every main and test class.