Docs

Quarkus Integration

Quarkus browserless test initialization, dependency injection, test profiles, and security integration.

QuarkusBrowserlessTest integrates with @QuarkusTest and uses Quarkus-specific instantiation for dependency injection into views. Tests run in a mocked Vaadin environment even though @QuarkusTest also starts the application and HTTP server.

Test Profiles

@TestProfile selects a QuarkusTestProfile that can override configuration, enable alternative beans, and supply test resources.

The Quarkus integration requires explicit registration of NavigationAccessControl as a UI BeforeEnterListener. A service-init observer can register it for the mocked service. Restricting that observer to MockQuarkusServletService avoids applying test-only setup to the application also started by @QuarkusTest.

Security Integration

When Quarkus Security is present, the mock environment obtains authentication from SecurityIdentity before UI creation and initial navigation. @TestSecurity supplies test-method authentication and requires quarkus-test-security. For simultaneous users, secured application contexts maintain each user’s security identity separately.

For a worked example, see Set Up Browserless Tests with Quarkus.

For a worked example, see Test View Access Control.

For the procedures previously covered here, see the Building Apps guide.

61B2F8E5-448E-4C36-82E3-D492712ECE67

Updated