CAPTCHA in automation testing

What is CAPTCHA?

CAPTCHA makes test automation more difficult, as it was specifically designed to prevent automated bots from using your web app.

For example, if you have a registration form, it might be protected by reCAPTCHA to prevent fake account registrations.

Disable the captcha on test environments

There are multiple captcha providers and each has a different way to disable it. For example, if you use reCAPTCHA you need to set a special "site key".

Allow BugBug to skip CAPTCHA during the automation testing

You can implement a special secret flag in your backend code to allow BugBug to skip the captcha.

  1. Add a custom header in your project settings with a secret string of your choice

  2. On your backend code, add a condition, that the captcha is not required if the request header contains this secret string

Last updated