+ Start a Discussion

The majority of my test methods are failing due to "Methods defined as TestMethod do not support Web service callouts "

Hey everyone, I'm at my wit's end. 40 of my unit test methods are failing with this error: "Methods defined as TestMethod do not support Web service callouts. Stack trace: null" seemingly out of nowhere. I haven't installed any new packages nor deployed any code that uses web service callouts in quite some time. I'm not sure why this is happening all of a sudden or what the source is. The test methods that are failing don't have any interaction with the few callout classes we do have (nor are there reference to them in those test methods).

Any help would be greatly appreciated!
v varaprasadv varaprasad
Hi BradC,

If we use HTTP callouts in class.Then we need to use  HttpCalloutMock Interface To test HTTP Callouts.

More Info on this please check once below links : 


I hope it helps you.

Please let me know in case of any other help.