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
john.krjohn.kr 

Methods defined as TestMethod do not support Web service callouts, test skipped

Hi,

 

when i run the testmethod for webservice class i am getting error message "Methods defined as TestMethod do not support Web service callouts, test skipped".how can i resolve this one

 

Thanks in advance

TrUs3Uw3TrUs3Uw3

Hi john.kr,

 

I would suggest to you to read Testing Apex first of all.

There is a technique to mock a callout. Please, look on my question where I posted a sample of my test.

 

 

 

Vinit_KumarVinit_Kumar

John,

 

Please go through the below link which shows how to test callouts.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm

 

You need to use test.setmock() method to test callouts and this is supported after API version 26.0,hence please make the API version of class to 26.0 or higher.