vaadin / vaadin/browserless-test
Improve Quarkus testing by preventing Vaadin servlet registration.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 51
Description
Browserless testing on Quarkus needs to mark Vaadin the test class with @QuarkusTest annotation so that all the augmentation provided by the Vaadin extension (scopes, beans, unremovables, ...) is available during test execution.
The drawback is that with @QuarkusTest, the application is started, including the servlet container and the Vaadin initialization.
With browserless testing, both are unnecessary and only slow down the execution of the tests.
After vaadin/quarkus#281 is implemented, the Quarkus browserless testing module should provide a test profile (BrowserlessTestProfile) named vaadin-browserless and a @BrowserlessQuarkusTest annotation which activates @QuarkusTest and the test profile`
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@QuarkusTest
@TestProfile(BrowserlessTestProfile.class)
public @interface BrowserlessQuarkusTest {}
The BrowserlessTestProfile class itself should also prevent the HTTP server from being bound to any port
public class VaadinFastTestProfile implements QuarkusTestProfile {
@Override
public String getConfigProfile() { return "vaadin-browserless"; }
@Override
public Map<String, String> getConfigOverrides() {
return Map.of("quarkus.http.host-enabled", "false");
}
}
User tests should then use @BrowserlessQuarkusTest instead of @QuarkusTest.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Quarkus browserless testing module and the existing user tests, then check the prerequisite vaadin/quarkus#281 behavior. Add the requested BrowserlessTestProfile and @BrowserlessQuarkusTest integration, and verify that browserless tests use the annotation without binding the HTTP server or starting the servlet container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100