You need to sign in to do that
Don't have an account?

Error | Methods defined as TestMethod do not support Web service callouts null
Hello,
I have below error message,
I have no web service calll from the class
I have below error message,
I have no web service calll from the class
Methods defined as TestMethod do not support Web service callouts null
Basically salesforce will not allow to do callout from test class .Either you can use Test.isRunningTest() method in your class code and hard code the response .Which will not do call out from test class .
Or you can use Webservice call out mock
Check below link .
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_testing.htm
Let me know if it helps !!
Thanks
Manoj
All Answers
Basically salesforce will not allow to do callout from test class .Either you can use Test.isRunningTest() method in your class code and hard code the response .Which will not do call out from test class .
Or you can use Webservice call out mock
Check below link .
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_testing.htm
Let me know if it helps !!
Thanks
Manoj
There is no callout in this test class
above is my test class, i dont see any callout or callout made by related class
You needs check may be any code is executing while inserting account . May be any out bound message in work flow or trigger please cross check once .
Thanks
Manoj.
I'm working on a controller class test and due to the creation of an object it's causing a web service callout.
You will need to see above links in thread and soon you will get it.
It took me a while to figure out
I'm curious what the "web service callout is" in my code (or in Sandrine's code). It doesn't seem like there is one.
So what needs to happen is that there needs to be a test that mocks this update?