quarkusio / quarkus

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

Add documentation for `@WithTestResource` and `TestResourceScope` #44530

Open HerrDerb opened 1 week ago

HerrDerb commented 1 week ago

Description

Due the lack of documentation of @WithTestResource and recent changes in 3.16.2, I just replaced all WithTestResource again with QuarkusTestResource as otherwise I ran in an OOM.

As I figured, @WithTestResource work with the TestResourceScope concept, which brings quite some different behavior, depending on the chosen scope. It would be helpful if those scopes, the way they work and example use cases would be documented in https://quarkus.io/guides/getting-started-testing.

Implementation ideas

No response

geoand commented 1 week ago

That's a great idea!

Would you like to kick start this?

geoand commented 12 hours ago

ping @HerrDerb :)

HerrDerb commented 12 hours ago

@geoand I can give it a try :) My only knowledge about this is reading the code, so it surely will be incomplete or even partially wrong 🙂 How do you want this to do? Should I just start a branch and you guys will take it over after or contribute onto it?

geoand commented 12 hours ago

Go ahead and push a draft PR whenever you are ready and we can update there