Human Challenge - Integration Testing Process
Human Challenge - Integration Testing Process
Human Challenge - Integration Testing Process
In order to ensure that Human Challenge was integrated correctly, it is recommended that the following test scenarios be executed. While the amount of test scenarios is small, there are some caveats to note in each one to ensure that it is indeed repeatable and possible to automate as well.
In each case mentioned below, the following scenarios should be tested:
Successful Attempt:
User-Agent: PhantomJS header to the request.x-px-captcha-testing: <captcha-bypass-token> header to the request with the bypass token generated in step (a).Failed Attempt:
User-Agent: PhantomJS header to the request.We recommend that, at a minimum, the following setups be tested in this manner to ensure that the integration was done correctly:
If you are unable to use the header manipulation flow mentioned above, we recommend you use the mobile verification flow and our VID extraction tool. Keep in mind that this flow can not be automated and is only applicable for manual testing.
In the case of ABR, you will need to override the window._pxOnCaptchaSuccess function and handle both the successful and failed results to trigger the correct step in your code.
Make sure that you added the Captcha Bypass Token before solving the challenge. This will ensure that our system ignores all detections and allows the challenge to be solved.
In the case of the mobile SDK, the correct function to override in customized pages is _pxOnMobileCaptchaSuccess, as can be seen in the documentation here. Make sure that you properly implement this function and retest.
Some of our detections block emulator based solves. To make sure these pass successfully, x-px-captcha-testing header to the request.
Unfortunately, Chrome’s DevTool emulator does not behave 100% like a mobile device and is not recommended for testing of Human Challenge.
Make sure that the User-Agent: PhantomJS header is a part of the request, and that the x-px-captcha-testing is not. If you solved the challenge in the last few minutes, be sure to clear your cookies and add a random string to the User-Agent header (e.g. User-Agent: PhantomJS-1) or wait 5-10 minutes for the challenge solve to expire.
If none of the answers above helps solve the issue you are experiencing, please contact us on our shared slack channel and our team will be happy to provide additional assistance.
You can define the solve time in advance by appending a tilde (~) followed by a number of milliseconds (between 1000 and 10000) to the CAPTCHA bypass header. This value will represent the solve time. For example: x-px-captcha-testing: my_bypass_token~5000.