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
karthik Jonnalagaddakarthik Jonnalagadda 

Methods defined as TestMethod do not support Web service callouts

Hello all,

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

can anybody tell what that mean.
public class TestSetIsCopiedToProjectFlagFalse {
 static testmethod void UnitTest()
         Account objAcc = new Account(Name = 'karthik test');
          insert objAcc;
    Ibanking_Project__c  objIbanking_Project = new Ibanking_Project__c();
       objIbanking_Project.Name='karthiktest trigger';
          Insert objIbanking_Project;

          Delete objIbanking_Project;

Andy BoettcherAndy Boettcher
TestMethods do not make callouts.  You'll want to implement either WebServiceMock or HttpMock depending on what your callout is/does.
sfdc Beginnersfdc Beginner
Hi Karthick,

In order to Test Web Service Callouts we have to create an Apex Class that Implements WebServiceMock Interfaces and in order
to Test HTTP Callouts an Apex Class has to implement HttpCalloutMock Interface.

Please find the links for writing test classes implementing WebServiceMock  & HttpCalloutMock Interface.

SFDC Beginner
karthik Jonnalagaddakarthik Jonnalagadda
Hello sfdc Beginner,
I am writing test class for trigger.may I  why should I Impliment WebServiceMock  & HttpCalloutMock Interface?