2 Factor Authentication & Automated tests

Has anyone had any experience creating test script for front end test cases on an application that uses 2FA & Google Authenticator?

Our application uses 2FA for users to login to the platform and I need to create test scripts for these. I currently use qTest Explorer to record the tests and then export the session as a python script to be run outside of qtest.

Background: I do not have a computer science background, and am working on getting more comfortable with writing out my own scripts so that I can do more automated tests vs. Manual



There is a way around it.

2FA is based on a secret and it generates a code based on that secret - you may have scanned a QR code with your device. The QR code would have contained the secret.

If you know the secret (speak to your devops or programmers) you can generate a code yourself on your end thus bypassing the traditional 2FA which requires a device.

Personally, I would approach the relevant people with the above and they should be able to help you with the specifics.

I hope this helps :slightly_smiling_face: