+ Start a Discussion

Regarding test method for a http callout in the constructor

I am making a Http callout in constructor of the controller. So as to initialize some data with the response.
I am stuck up with writing a testmethod for it.

In the test method I am  making an instance of controller..this will execute the constructor and hence  http callout.. which is not allowed in the test method.


Please guide me how do I write a test method for it...


Thank You