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
SarbelloSarbello 

Code Coverage anomaly

Odd issue: I have a Class (Class A) that requires code coverage. I write my code coverage from Class B. When I run Class B (decorated with '@isTest', and methods with ‘testMethod’) the test runs fine. I confirm that Class A was tested and even place System.Debug statements to demonstrate it went through the logic in Class A. The issue is Class A always shows 0% coverage. For reference, Class A makes my callout. However I’ve wrapped the WebServiceCallout.Invoke with a ‘if (!Test.isRunningTest())’

 

Any thoughts?


Thanks - Dave

RonakPatel.ceRonakPatel.ce

Hi,

 

your code is not tested in if (!Test.isRunningTest()) condition
Can u give me your code for class A
i will try