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
Sergio Mac-IntoshSergio Mac-Intosh 

Testclass for webservice calls

How can my testclass test service calls.
When i run the testclass atm it stopt because of Salesforce doesn't support these calls.
Sneha1991Sneha1991

Hi Sergio Mac-Intosh,

You can test web service calls in Test class. You have to implement WebServiceMock interface and override  public void doInvoke() method and create dummy response for the web service.

Check the below link :

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_testing.htm


Thanks.