How to download all test class and coverage of each class from org. Long back i did but i forgot How i downloaded. We can get One Excel sheet. Can anyone please help me how to download all test classes?
If you just want to quick look on coverage by apex class/trigger-
- You can use developer console: https://help.salesforce.com/articleView?id=code_dev_console_tests_coverage.htm&type=5
You can make a query on object that stores this data using Tooling API:
select ApexClassorTriggerId, NumLinesCovered,NumLinesUncovered,Coverage from ApexCodeCoverageAggregate
Now, specific to this question, there are two way to download this info:
We can download by making a query on 'ApexCodeCoverageAggregate' and parsing result using apex.
EASIEST way to download it to by using Chrome plugin Advance Code Searcher. On setup home page, you can download org test classes coverage info with help of this plugin.