function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
George WilliamsGeorge Williams 

Unit tests pass but are not displayed in code coverage

I have been running into a problem during unit testing over the last few months where for whatever reason some tests mysteriously disappear from the code coverage drop down list after they finish running.  This happens with both re-run tests and new tests either started from the developer console or the Apex Test Execution page.  As an example I have been trying to run 25 tests on a controller today but even though all 25 tests are passing only 9 of them are being used in the code coverage caluclations in the developers console.

I have Parrallel Testing disabled, I have tried clearing the test history and test data.  I have tried creating new workspaces, and I have tried re-saving my test class then running the test.  I have even tried deleting Chrome's history and saved data.  None of these has fixed the issue.
 Does any one have additional advice or know of any existing open bugs that might be causing this?
Best Answer chosen by George Williams
George WilliamsGeorge Williams
We have figured out what was going on.  For whatever reason the amount of data we were creating or something similar was causing the developer console to malfunction and only display a random amount of tests in the coverage data.  When I placed half of the tests into a new test class and ran both classes all of the test methods were showing in the coverage total.

Not sure if this is a defect in the developer's console but it sounds like one to me.