Activity Forums Salesforce® Discussions How can I get code coverage programmatically through Apex?

  • Surbhi

    Member
    June 3, 2016 at 2:13 pm

    Hi Ravi,

    For synchronous testing: The run tests result returned by calling ApexService.runTests() contains a code coverage property, which is a code coverage result array.

    The code coverage result locations not covered property gives you the line number and column of code that wasn't tested in the run.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos