• SpinozaQ
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0

I have been refactoring a large application recently and have began creating tests for the major components of the application today. I have been executing a single test through the Apex Test Excecution feature. Upon looking at the code coverage for a basic class, I found that many code comments, and blank lines ( only white space. ) were marked in red, indicating they are not covered. This is clearly an error, comments should always remain white. I verified this was adversely affecting code coverage by removing the comments, and re-running the test. The coverage increased by 2 percentage points.

Here is a screen shot of the code coverage stats showing comments and blank lines in red.  I believe the parsing issue may somewhat involve the multi-line SOQL query. When I place the query on one line some of the issues are corrected.


Code Coverage APEX Test Run