Does anybody here have experience E2E testing Vaadin Flow applications?
Can you tell me about any of the testing libraries mentioned above, maybe even compare them?
What works well? What doesn’t?
TestBench consists of two parts. The other is extension of Selenium, which gives testing API’s for stock Vaadin components, so that they are easy to find and use. This also makes your tests compatible when there are DOM changes in the components. E.g. your tests for Vaadin 14 apps would still work with Vaadin 24 for example. The other part is UI Unit Testing, which makes possible to perform integration testing of the UI without browser.
Selenium and Playwright are both browser based testing tools. The idea is the same with the both. Browser is controlled via browser driver to perform the tests. This means that you do need to deploy the application to sandbox in order to run the tests. Currently we do not have TestBench extension to Playwright, only Selenium.
There is a good documentation.
We use both the testbench unit testing and testbench selenium libraries, both work very well.
This documentation page has some details about Playwright testing: Testing with Playwright | Testing | Flow | Vaadin Docs
And here’s a blogpost by Matti: Testing Vaadin applications and add-ons using Playwright | Vaadin
I prefer Playwright with Mopo.
IMO it’s faster and less flaky than Selenium