0

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?

3
  • Are you just looking for coverage data? – Adrian Larson Aug 24 '16 at 16:16
  • Yeah. I need a document for that. coverage data, how many line covered and not covered column wise i need. Can you please help me – user24737 Aug 24 '16 at 16:24
  • 1
    You may find this post of interest. See also this Idea. – Adrian Larson Aug 24 '16 at 16:28
1

If you just want to quick look on coverage by apex class/trigger-

  1. You can use developer console: https://help.salesforce.com/articleView?id=code_dev_console_tests_coverage.htm&type=5
  2. You can make a query on object that stores this data using Tooling API:

    select ApexClassorTriggerId, NumLinesCovered,NumLinesUncovered,Coverage from ApexCodeCoverageAggregate

    enter image description here

Now, specific to this question, there are two way to download this info:

  1. We can download by making a query on 'ApexCodeCoverageAggregate' and parsing result using apex.

  2. 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. enter image description here

0

You may find this post of interest. See also this Idea.

One option that should work is to copy the coverage data from the Developer Console and paste it into your spreadsheet. Not pretty, but workable if you just need a quick and dirty solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy