Sunday 20 September 2015

Code Coverage Report in excel Format | Test Class Result in XLS





Now you can view the overall and individual entity code coverage in your organization. The results of the code coverage can be downloaded in Excel format

For Same you Can install the below App Exchange Product


Code Coverage Report

https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

How to configure the App. 
Please check below link for same.
https://appexchange.salesforce.com/servlet/servlet.FileDownload?file=00P3000000Qq5GkEAJ

How To Configure This APP

You can check the Setup step in Installation and Configuration Tab



Step 1:- Setup Remote Site Setting

Add a value for Remote site setting (In same org in which package is installed)
Goto Setup > Administration Setup > Security Controls > Remote Site Settings Add value to your Salesforce instance, for example  'https://na34.salesforce.com’



Step 2 Setup Base URL

Please set your Base URL.
Go to Setup > Develop > Custom Settings > Code Coverage Configuration > Manage > New. Set the name to 'baseUrl' and the value to your Salesforce instance, for example 'https://ap2.salesforce.com'

à Open Custom Setting and Click on Code Coverage Configuration 


à Then click on Manage


à Then click on Manage and then New Button and then Enter the below detail
Name as :- baseUrl

(Please enter your org base url.)






15 comments:

  1. I got error:.
    Please check Custom Setting and Remote Site Setting baseUrl Value -> Malformed JSON: Expected '{' at the beginning of object

    I have configured the app according the instruction with my own org base url. I also run all test

    ReplyDelete
  2. It look like you have not configured the App properly. Can you please send me screen shot of your Remote Setting and Custom Setting value.

    Amit Chaudhary

    ReplyDelete
    Replies
    1. You can send me screen shot on my email id :- amit.salesforce21@gmail.com

      Delete
  3. Hi Amith, This is really good application. But if you differentiate manged package classes & local classes, that is really helpfull. And I have one more question. Is this this application generate the report for classes/triggers greater than 2000 count?

    ReplyDelete
    Replies
    1. Thanks for Your Feedback. I will try to differentiate manged package classes & local classes

      Delete
  4. Hi Amit, is this project open source? I have to build something similar and it would be great to have a base where to start. Thanks.

    ReplyDelete
    Replies
    1. Hi,
      This is app exchange product. You dnt need to develop the you can download the same in you org from app exchange as it is a free of cost.

      https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

      Thanks
      Amit Chaudhary

      Delete
  5. Hey Amit,

    Despite of running the tests, I do not see any code coverage. Any clue?

    Thanks,
    Jinesh

    ReplyDelete
    Replies
    1. Please share your mail class and test class

      Delete
    2. You need my complete test class?

      Delete
  6. if i configured domain name then what would be my instance

    ReplyDelete
    Replies
    1. PLease check your top URL. IF you can post your URL here after login then i can help you. It should be like below

      https://DomainName.naXX.force.com

      Delete
  7. Hello Amit,
    We get this error message "Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 254.859KB" when tried to generate the report. We do not have access to edit the VF page. Could you suggest how to overcome this issue. Thank you for your help!

    ReplyDelete
    Replies
    1. This is a free app and currently we are providing support for limited number of apex classes and Trigger code coverage.

      This is the know issue and i am working on same. This issue is coming in large org only. Please feel free to connect with us on amit.salesforce21@gmail.com. I will try my best to resolve your issue.

      Delete
    2. I have fixed the issue in below Beta version

      For Prod:-
      https://login.salesforce.com/packaging/installPackage.apexp?p0=04t280000005h3v


      For Sandbox
      https://test.salesforce.com/packaging/installPackage.apexp?p0=04t280000005h3v

      Soon i will upload the same on app-exchange. Please check and confirm if your issue is resolved

      Delete