I have a bunch of tests that test functionality/features to validate updates of the particular SAAS web application.
The tests always run well from my development machine with no waiting or pauses built in.
However when I run the tests from the corporate infrastructure (Jenkins) I have lots of flaky problems.
If I run the test on the Jenkins server in the foreground I also get flaky results. If I enable enable_presenter_mode=true, the whole test slows down and I get solid results.
If I add 0.5 second delays between each request the tests complete successfully every time. I strongly suspect that the issues are coming from the corporate security software that is installed on the infrastructure.
Is there a way that I can just easily add enable_presenter_mode “duration” like delay to each request when running headless?
The alternative is to stick 100’s ofwaits everywhere or startup a long daunting discussion with the security guys to figure out why we are having the issue.
It might not be the best option but one approach you could use is to create a listener file and use a simple end_keyword with a sleep in it, this will add a sleep to every keyword (or use the end_user_keyword or end_library_keyword variations if you prefer). then you can still run locally with no delay and just include the listener that adds the delay when you need it.
Best part of this option is no change to your tests, so when you’ve had the discussion with the security team you can stop including the listener, and in the meantime you can easily turn it on and off as needed.
I’ll be interested to see what other suggestions you get
Thanks Dave, I have been looking at the listener option … and then came across slowMo= when launching the browser. Slomo seems to work similarly to duration in presenter mode, but slows things down even when headless.