ui-unit-testing
Browserless Testing in Vaadin 25
Use the Vaadin MCP tools (search_vaadin_docs) to look up the latest documentation whenever uncertain about a specific API detail. Always set vaadin_version to "25" and ui_language to "java".
What Browserless Testing Is
Browserless tests (previously called "UI Unit Tests") run server-side Java code without a browser or servlet container. You interact directly with your server-side view classes and Vaadin components. The BrowserlessTest / SpringBrowserlessTest base classes set up the Vaadin session, UI, and routing — all in the same JVM as your JUnit tests.
This makes tests fast (milliseconds, not seconds), stable (no browser flakiness), and easy to run in CI.
Free for all users since Vaadin 25.1. Earlier versions required a commercial TestBench subscription.
When to Use Browserless Tests vs. End-to-End Tests
Browserless tests — the default choice for most view testing:
- Testing view logic, navigation, form validation, component state
- TDD workflows where you run tests on every save
- Verifying that clicking a button shows the right notification
- Testing data binding and Binder behavior