I am using Cucumber-JVM for my functional automated testing. Underneath code is selenium-java.
My application uses google authentication. If I have 50 tests in my suite and I run my tests, sometimes I face CAPTCHA in login steps and all my tests start failing.
One way to solve this problem forever is if somehow I mock/setup login using cookies or if I retain the browser session.
I know retaining the browser session could result in other different problems and it is always recommended to start your tests from clean browser tests.
Has anyone ever faced this issue and can help me with this? What may go wrong if i use same browser session for all my cucumber scenarios?
I think the best approach would be to work with your developers and deploy this application without Captcha on your test environments. That would be the cleanest way to get things done.
Your approach:
Pros:
Cons: