-
Notifications
You must be signed in to change notification settings - Fork 134
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
Support Gradle test delegation #1045
Comments
The project classpath is resolved by buildship (if it's a Gradle project). To help us better understand the problem, would you mind to share a sample project for this issue to us? |
Attaching the most minimal i could produce. There's only one test class - First do a This initial normal build is set to auto generate Now remove the
|
Here are some findings: I can repro this issue and I also tried the project in Eclipse and IntelliJ. In Eclipse, same error when running the test, but it can successfully run if I use the In IntelliJ, since it will delegate to Gradle by default, so the test runs successfully. Seems that we need to support |
I have the same problem. A "Delegate to Gradle" Feature would be great! |
Any update on this? |
I have the same problem. A "Delegate to Gradle" Feature would be great! |
I tried to call "gardle test" with vscode-gradle but could only get as far as the call.
|
Yes, please! |
Update: I'm implementing gradle test delegation recently and it will come very soon |
The Gradle Test Delegation (both run and debug) has supported now. To use this feature, you need to install the latest Test Runner for Java and Gradle for Java extension. To delegate the tests to Gradle, you can set the default testing profile in Testing explorer: If you do not want to change the default testing profile, you can trigger an one-time execution via: |
@jdneo I don't see Delegate Test to Gradle option in my VS Code: Any hints how to enable that feature? |
Inside
src/test/resources
there is anarquillian.xml
file that has to be expanded by gradle atprocessTestResources
task. When a test is run from within vs code, this doesn't happen and the resource file is used as is. This triggers an error from Junit that basically says that some property is invalid (because it's expanded, i.e. junit see it as${somePropToExpand}
).Same thing occurs when arquillian.xml is auto generated by a plugin - a gradle plugin can auto create it and put it directly in the buildDir/resources/test dir. When a test is run from within vs code, basically the file is invisible to vs code.
Both of these problems can be corrected by having a:
But that by itself creates a new set of problems for the build.
The text was updated successfully, but these errors were encountered: