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
sdusdu 

Why test method cannot make callouts??

How am I suppose to get enough test coverage if most of my code is doing callouts but test method does not allow callouts??

ShamilShamil

You can go through these links:

http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods, read the 'Test Methods and Apex Callouts' section

and a fancier approach:

http://wiki.developerforce.com/index.php?title=Virtual_Callout_Testing