Project

General

Profile

task #7356

Updated by Andreas Kohlbecker almost 6 years ago

The primary option to setup a test suite for testing the cdm-vaadin UIs is to use the **Vaadin Test Bench**. Even if this product is open source (https://github.com/vaadin/testbench) it is a commercial product and purchasing a proper license seems required for using it even if the test bench can be compiled from source. 

 An alternative is to use selenium directly on the vaadin ui as demonstrated by the [selenide project demo](https://github.com/selenide-examples/selenide-vaadin-demo), [Selenide](https://github.com/codeborne/selenide/) by the way is an alternative to Selenium which promises to be simpler to use. 

 The major benefits of the **Vaadin Test Bench** over plain selenium seems to be: 

 1. integrates application startup 
 1. can run on a hub or parallelized -  
 1. has "intelligent" wait() functionality "*In pure Selenium, you need to use the wait methods explicitly, and 
 know what to use and when. Vaadin TestBench works together with the client-side engine of 
 Vaadin framework to immediately detect when the rendering is finished. Waiting is implicit, so 
 you do not normally need to insert any wait commands yourself.*" (Book of Vaadin chapter *23.8.1. Waiting for Vaadin*). This functionality is provided by the `com.vaadin.testbench.commands.TestBenchCommandExecutor.waitForVaadin()`. The waitForVaadin method is automatically called when specific WebDriver methods are invoked. The `DriverInvocationHandler` cares for this. 
 1. Selenium Element for each of the Vaadin UI components 

 Options to replace the Vaadin Test Bench Magic by own developments (number in the list correspond to the numbers above) 

 1. starting of jetty before maven integration test and to stop it afterwards is quite easy to setup 
 1. not need to do this in the test framework itself. Jenkins provides much better means to do that. 
 1. The intelligent wait could be easily replaced by an own implementation 
 1. not urgently needed 



 

Back