Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
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? 
2 answers
  1. Oct 25, 2020, 5:11 PM
    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.
  2. Oct 25, 2020, 3:46 PM
    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:

    >> https://developer.salesforce.com/forums/?id=906F0000000BYCIIA4

    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.  

    Thanks.
0/9000