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
Arthur LockremArthur Lockrem 

Code coverage is frozen

The code coverage in my managed package org is frozen.  No changes I make are reflected in the coverages.  Examples below:

- I have added additional methods to my utility class and test methods to one of my test classes.  The test method is never executed, and the utility method is ignored.  The number of lines tested does not reflect the presence of the new method.  When I review the results in Developer Console, the method is there, and not highlighted at all. (see code below)

- A different class has been greatly reduced.  It changed from 258 lines of code to 16.  The code coverage still shows 258 lines, with 88 lines untested, even though the file only has 16 lines of code.  Same as the previously stated method, the Developer Console summary shows 258 lines of code, while the details of the class show only the 16 lines available.

Example of newly added methods not reflected in test coverage.

In utility class:
public static String getTestResults(String origValue) {
		
	String a = origValue;
	String b = a;
		
	return b;
}

In test class:
testMethod static void testTestResults() {
		
	String a = Utility.getTestResults('Test');
	System.assertEquals(a, 'Test');
}

 
Shashikant SharmaShashikant Sharma
Could you do run all test and see the code coverage then.
Arthur LockremArthur Lockrem
That is how I determined the test results are frozen.  Run all tests does not run all tests anymore for this organization.