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
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