-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide test class orderer to order based on test annotations #22072
Comments
@famod you have already covered this in QuarkusTestProfileAwareClassOrderer, right? |
Ah, nice to see that some else has this need! 🙂 Yes, that orderer should cover this request. Starting from 2.6.0.CR1, this orderer is active by default, which wasn't the case before. @GregJohnStewart please do check it out and let us know if there's anything you miss. Thanks! PS: There is at least one more idea for improvement: #21892 |
I'll close this because we already have such an orderer. Please do file a new issue in case you run into a bug or have ideas for improvement. |
Ah, did not see this before! Must have not seen that version of the docs when I was looking around somehow. The only other thing I can think of is taking the other test-related annotations into account, but I might leave that to you! |
Which others do you have in mind? As of 2.6.0.CR1 this orderer not only takes |
That actually might be enough for me, I might say potentially the super class of the testclass, but that is because that is how I have implemented things on my end. Profile and testResource is probably fine |
Description
Currently when testing with different profiles, one needs to be careful about the order of the classes so that you don't have to stand up the Quarkus service more than is necessary.
We should provide a
ClassOrderer
that developers can enter injunit-platform.properties
that can automatically determine the appropriate ordering of test classes based on their annotations.I would suggest ordering based on all test annotations, not just test profile. Perhaps there could also be a new test class annotation that would let the developer determine their own order.
Implementation ideas
I already do this (for just test profiles) in my project:
This will obviously need expanding/ improvements but is along the lines of what I am suggesting to provide.
The text was updated successfully, but these errors were encountered: