Friends, in spring 13 release, Salesforce has removed the test class which shows what are all the classes covered for a test class, if we run that particular test class alone and now everything goes to Apex Test Execution which doesnt show detailed information. any ideas how to find that. Now, even if I look at my code at a later date, I won't know which test class is for covering which apex class/code. Any ideas friends??!!
|
If you go to the Code Coverage page for a class you can use the drop down at the top of the page to see what coverage each test class gives to the class in question. Either click on the percentage in the Code Coverage column on the Apex Classes page or directly create the URL: https://server.salesforce.com/setup/build/viewCodeCoverage.apexp?id=classIdStartingWith01p Alternative 1 - Run the tests outside of the Salesforce web interface Alternatively, if you run the tests outside of the Web interface via the apex SOAP API you still be the classes covered report. See tweet from Rich Unger -
So, if you run the tests from Eclipse you will still see the classes covered under the Code Coverage Results. Alternative Number 2, the Developer Console. Go to the Tests Tab in the Force.com developer console and select you test run. There is a Window that shows Class Code Coverage. Double clicking there brings up the line by line code coverage.
Alternative Number 3, attempt URL hacking This is untested and may not work or may break something. It comes with no warranty. I don't know you and I don't how how you got here. You could try recreating the URL that runs the tests. E.g. https://server.salesforce.com/setup/build/runApexTest.apexp?class_id=classIdStartingWith01p&class_name=TestClassName&ns_prefix=namespacePrefix |
|||||||||||||||
|
