Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quarkus @QuarkusTest vs @QuarkusIntegrationTest

Apologies if it has been answered before, but I can't seem to find a good answer.

What is the context of how @QuarkusTest runs versus QuarkusIntegrationTest?

So far, all I got is the integration test runs against a packaged form of the app (.jar, native compilation), whereas the plain @QuarkusTest doesn't? But this does not leave much explanation, and apologies if this comes from a lack of understanding in test runtimes.

To start a test instance of Quarkus (via @QuarkusTest), does it not compile and package into a jar? Makes sense to not I suppose, and just test against running compiled classes but I would rather get the real answer than assuming.

https://quarkus.io/guides/getting-started-testing#native-executable-testing

like image 478
Snappawapa Avatar asked Dec 03 '25 15:12

Snappawapa


1 Answers

Besides the difference you mention, there's another crucial difference between @QuarkusTest and @QuarkusIntegrationTest. With @QuarkusTest, the test runs in the same process as the tested application, so you can inject the application's beans into the test instance etc., while with @QuarkusIntegrationTest, the tested application runs in an external process, so you can only interact with it over network.

like image 68
Ladicek Avatar answered Dec 06 '25 15:12

Ladicek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!