Method defined as testMethod do not support web service callouts, test skipped
I have been struggling with this error for a few days now. I get this error every time I try to run a test for a method that has an httpCallout. I followed the architecture from http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_testing_httpcalloutmock.htm, but to no avail. I thought it could be something I was messing up in my code, so I copied all three of the classes from the documentation, and I am still getting the error when I try to run the test. All of the classes are on Salesforce API 29. Has anyone run into this before?
you may want to include test.isrunningtest in your actual callout class to check you are not going to run actual callout and only test mock. take a look on this thread
http://salesforce.stackexchange.com/a/5070/7709 this answer did it! Thanks so much! You are a god among men! I was banging my head against the desk with this error for a while now.
Although this fixes the problem, you shouldn't do this in must cases. You'll want to actually test your code with a mock response and should follow alex answer.