Skip to main content

Posts

Showing posts from March, 2017

Unstable Vaadin UI tests

I have experienced a lot of issues with UI testing with Vaadin and Selenium. The test cases might seem to run OK initially but turn out very easily to be unstable, especially if the machine running tests is much faster/slower than the machine the tests have been written. The setups I have used contains some version of selenium, Robot framework, jBehave or CasperJS and PhantomJS, Chrome or Firefox. I haven't used the Vaadin Testbench. Here are my five cents to create stable Vaadin UI tests. Don't use the in-built "is page loaded" methods, those rarely apply to single page JS apps. Use the JS object "vaadin" and its properties isActive() and initialized to determine when it is OK to modify the UI. Run in production mode, I have had a lot fewer issues like this. Capture the browser logs, filter out there all info category messages and see if there are errors. Use xpaths to find the correct elements. I have noticed that it helps if you wait first for some