• e.weetch
  • NEWBIE
  • 20 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I'm trying to determine where code coverage is lacking (on Production) so I can write new Test Cases, but the highlight feature in Developer Console seems to be breaking under certain circumstances...

After clearing test data & running all tests from Developer Console,
  1. Sometimes, under "All Tests", it's highlighting blank lines, or lines that only contain comments / braces / debugs, as covered (or uncovered), and failing to highlight code lines.
  2. Sometimes, when selecting a specific test, it's showing a % coverage, but not highlighting any lines one way or the other.

I ran
SELECT ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage,ApexTestClassId FROM ApexCodeCoverage
SELECT ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage FROM ApexCodeCoverageAggregate
against the Tooling API, and got the same results: blank/comment/etc lines included, code lines ignored, and entries along the lines of:
"NumLinesCovered": 555,
"NumLinesUncovered": 55,
"Coverage": {
"coveredLines": [],
"uncoveredLines": []
}
(i.e. empty arrays for coveredLines / uncoveredLines, which seems wrong given that it's just given counts of each of these.)


Oddly it seems to be highlighting correctly in Sandbox in at least some of the cases it's getting it wrong in Production... but getting a lower % overall coverage?
(There are quite possibly differences between Production and Sandbox that would cause this, though, hence my wanting to check coverage on Production.)


Has anybody else experienced this? Any thoughts on resolution?
Unfortunately, I'm not likely to get permission to post the code in question, and I suspect it'll take a fair amount of effort to replicate this.
Did consider a Sandbox refresh, but have a notion this might just break it in Sandbox too...


Thanks in advance!
I'm trying to determine where code coverage is lacking (on Production) so I can write new Test Cases, but the highlight feature in Developer Console seems to be breaking under certain circumstances...

After clearing test data & running all tests from Developer Console,
  1. Sometimes, under "All Tests", it's highlighting blank lines, or lines that only contain comments / braces / debugs, as covered (or uncovered), and failing to highlight code lines.
  2. Sometimes, when selecting a specific test, it's showing a % coverage, but not highlighting any lines one way or the other.

I ran
SELECT ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage,ApexTestClassId FROM ApexCodeCoverage
SELECT ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage FROM ApexCodeCoverageAggregate
against the Tooling API, and got the same results: blank/comment/etc lines included, code lines ignored, and entries along the lines of:
"NumLinesCovered": 555,
"NumLinesUncovered": 55,
"Coverage": {
"coveredLines": [],
"uncoveredLines": []
}
(i.e. empty arrays for coveredLines / uncoveredLines, which seems wrong given that it's just given counts of each of these.)


Oddly it seems to be highlighting correctly in Sandbox in at least some of the cases it's getting it wrong in Production... but getting a lower % overall coverage?
(There are quite possibly differences between Production and Sandbox that would cause this, though, hence my wanting to check coverage on Production.)


Has anybody else experienced this? Any thoughts on resolution?
Unfortunately, I'm not likely to get permission to post the code in question, and I suspect it'll take a fair amount of effort to replicate this.
Did consider a Sandbox refresh, but have a notion this might just break it in Sandbox too...


Thanks in advance!
Created new developer org, but not understanding how to enable lightning experience.?