Quarkus @QuarkusTest fails when running isolated JAR outside project directory #48668
Unanswered
allanh1193cr
asked this question in
Q&A
Replies: 1 comment
-
We're currently searching (in vain) for a way to trigger Quarkus Cucumber tests in a deployed test microservice on our test cluster stages via a RestEndPoint. I consider this an absolutely necessary approach for automated cluster testing. Could the Quarkus (Cucumber) team provide a minimalist Git project as a working example? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Quarkus 3.16.3 + Gradle project that runs Cucumber tests using @QuarkusTest. I've created an isolated test runner JAR to run tests independently, but it only works from within the original project directory.
What Works:
Running the JAR from the main project folder works perfectly:
This is the log output before to run the tests. Docker is starting, gradleAppModel is working and the tests run perfect.
What Fails:
Running the same JAR from any other directory fails: For example if I go to the downloads folder or I move my terminal to another folder different than the main root of my project folder and I run exactly the same command I have an error. This is the log errors:
This is how my classes looks:
class to create the isolated Jar and run my tests without start the quarkus server:
build.gradle file:
Main class:
What I've Tried:
How can I make a Quarkus test JAR with @QuarkusTest work independently of the original project directory? Is there a way to package all necessary project metadata into the JAR, or should I use a different approach for portable test execution?
Beta Was this translation helpful? Give feedback.
All reactions