quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.81k stars 2.68k forks source link

Proposal: Decoupling QuarkusIntegrationTest from JUnit Jupiter #44420

Open rmanibus opened 2 days ago

rmanibus commented 2 days ago

Description

Summary Currently, the QuarkusIntegrationTest functionality is closely tied to the JUnit Jupiter TestEngine, which limits its flexibility. Ideally, the integration test logic should be more modular to support other testing platforms.

Context

I am working with the CucumberTestEngine for integration tests, but the current setup makes it challenging to use with QuarkusIntegrationTest. The workaround in the Quarkiverse Cucumber extension, which hooks Cucumber into Jupiter using dynamic tests instead of leveraging Cucumber’s native TestEngine, demonstrates the limitations of this approach. While this workaround technically enables testing with Cucumber, it is cumbersome, requires substantial additional code, and doesn't scale well.

Implementation ideas

Create a QuarkusIntegrationTestManager class to handle the core integration test lifecycle independently from any specific test engine.

The class could expose the following static methods:

start(): Initializes and starts the Quarkus application for integration testing. stop(): Stops the Quarkus application after integration testing completes.

quarkus-bot[bot] commented 2 days ago

/cc @geoand (testing)

geoand commented 1 day ago

If someone is willing to do the work on this, I am certainly open to having it in.

But I am pretty sure it will be more work than just creating the QuarkusIntegrationTestManager with the methods described.