As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to provoke Selenium focus issues that only occur when two focus-sensitive Selenium scenarios run at the same time (probably with parallel_tests Show archive.org snapshot ). This can help you to detect and fix flickering integration tests.
The attached feature works by going to your root_path
and focusing a random form element every 5ms.
Instruction:
focus_issues.feature
(you'll see). Default is 5 minutes. It should be longer than your flickering tests take to run.root_path
contains a form element (select, input) or edit the step definition to visit another path.cuc features/focus_issues.feature features/flickering_tests.feature
cuc-show
to see the Firefoxes). Make sure that the window opened by focus_issues.feature
stays on top (this will be the window showing your root_path
with randomly focused input elements).focus_issues.feature
has finished its duration. You can CTRL+C out of that.You can now fix your focus-sensitive tests.