9

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

Snappawapa
  • 1,697
  • 3
  • 20
  • 42

1 Answers1

14

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.

Ladicek
  • 5,970
  • 17
  • 20