Skip to content

Testing the CAPTCHA

TrustCaptcha offers the following options to avoid blocking fully automated unit, integration, or end-to-end tests.

If you do not need to test the correct functionality of the CAPTCHA itself, you can simply skip the CAPTCHA. Hide the CAPTCHA in your frontend environment and skip the validation of the CAPTCHA verification result on the server side.

If the IP addresses or IP ranges of the clients on which the automated tests are run are known, they can simply be added to the IP whitelist in the CAPTCHA settings. All requests from these IP addresses are always assigned a bot score of 0 and do not need to solve a proof-of-work task.

If you do not want to skip the CAPTCHA entirely or cannot specify fixed IP addresses or ranges, you can use bypass keys. Bypass keys can be created in the CAPTCHA settings and then used in the source code of your frontend when it is in the test environment. When attempting to solve the CAPTCHA, it will always receive a bot score of 0 and will not be required to solve a proof-of-work task.