+ Start a Discussion
Sure@DreamSure@Dream 

test coverage for Adding Captcha for site page

Hi

I am using the code in below link to add CAPTCHA to my site page.
https://developer.salesforce.com/page/Adding_CAPTCHA_to_Force.com_Sites

In test class how can I create a scenario for success and failure for entering CAPTCHA.

Thanks alot.
Alex TsitsuraAlex Tsitsura
Hello

If I understand your requirement correctly, you can create two HttpCalloutMock Class,  that implement different scenario.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_testing_httpcalloutmock.htm