test coverage appears for testMethod's

Issue #599 resolved
Andrey created an issue

see the attached screenshot:

test_coverage_bug_1493235044788.png

it started appear at previous plugin version and did not go after update.

Comments (9)

  1. Scott Wells repo owner

    Oh good lord...that's my fault. I added some logic to provide visual coverage indicators for completely uncovered classes since the API doesn't actually provide that (well, it does but it's a REALLY expensive API to call if you have a large amount of uncovered code). Evidently I didn't filter out test classes/methods. It shouldn't be reflected in actual metrics, though. It's a purely cosmetic thing. I'll fix that in the next build. Sorry!

  2. Scott Wells repo owner

    Andrey, would you mind sharing a little info about the test class that's showing coverage markers? Is the class itself annotated as @IsTest? I see that you're using testMethod instead of @IsTest annotations at the method-level as well, and that's obviously totally fine. I'm asking because I'm only showing this "pseudo-coverage" when the API itself tells me that there are uncovered lines but doesn't give me line-level details. It's odd that the API would be including information about test classes in its response.

    Do you mind adding the following to Help>Debug Log Settings and re-running tests/showing coverage:

    #com.illuminatedcloud.intellij.coverage.ApexCoverageEngine
    #com.illuminatedcloud.intellij.coverage.ApexCoverageSuite
    

    Then please send your idea.log which can be found using Help>Show Log in Explorer/Finder. Feel free to email it to me if you'd prefer. I'm curious to see what the API responses say about test classes/methods...

  3. Andrey reporter

    @RoseSilverSoftware, that's how the class header starts:

    /**
     * @author MAndrey
     * @date 4/24/17
     * @group Entitlements
     * @group-content https://jira....
     */
    @isTest
    public with sharing class TestEntitlemets {
        public static testMethod void testSetDefaultTemplate() {
    ...
    

    i will send you the logs shortly.

  4. Andrey reporter

    changed notation to the following, but still see the test coverage red marks and "0.00% covered" in the Project view.

    @isTest
    /**
     * @author MAndrey
     * @date 4/24/17
     * @group Entitlements
     * @group-content https://jira....
     */
    public with sharing class TestEntitlemets {
        @isTest static void testSetDefaultTemplate() {
    ...
    
  5. Scott Wells repo owner

    Andrey, based on our discussion I actually am going to resolve this for now. I'm hesitant to filter out coverage for classes reported by the API because I'd hate to accidentally filter out something for which coverage should be reported.

    If you do see this happen again, please see if you see the same thing in the Developer Console. Also, please let me know and we'll do a little more debugging to try to understand how best to handle it.

  6. Log in to comment