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
RedSalesRedSales 

Find Out Which Class is providing Test Coverage to my Class?

Hello,   I have to change a class that was created 2 years ago by a different colleague. The current test code coverage is 88% for the class and there is no clear test class available that I can see which has produced this test coverage result.  Is there a way to detrmine how this test coverage was provided? I.E. which classes resulted in the test code coverage being provided to the class I wish to change?

Best Answer chosen by Admin (Salesforce Developers) 
MandyKoolMandyKool

Hi,

 

There is no direct way to find this out. What i can provide is the alternative to find this out :)

 

What you can do is just change the name of the current class and save it. Then run all the test methods for the entire organization. Automatically the classes and methods which are referring to this class will fail and salesforce will give you the names of those classes with methods :D .

 

Hope this will help you!!

 

If this solves your problem plz mark this as solution

 

Thanks,

Mandar.

All Answers

MandyKoolMandyKool

Hi,

 

There is no direct way to find this out. What i can provide is the alternative to find this out :)

 

What you can do is just change the name of the current class and save it. Then run all the test methods for the entire organization. Automatically the classes and methods which are referring to this class will fail and salesforce will give you the names of those classes with methods :D .

 

Hope this will help you!!

 

If this solves your problem plz mark this as solution

 

Thanks,

Mandar.

This was selected as the best answer
Starz26Starz26

Or,

 

You can do a keyword search of the classes using the IDE