-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Installing Java Test Runner Support for Java #14871
Comments
@tsmaeder do you happen to know about any ongoing work related to java test runner support ? |
No, there is nothing planned. |
@tsmaeder moving to P2 and letting you prioritize accordingly ;-) |
Java Test Runner plugin is not shown in the available plugins in the editor on running a custom plugin registry. Running
It seems to be repeated 103 times as indicated by this command which is very close to 101 times as returned by this command My meta.yaml file for the java-test-runner (v2 used as mentioned in #14853's comment):
|
As you have moved this to a P2 priority, would you mind if I take this up? If yes, can you please suggest me the steps I should take? |
@thisHermit |
In your case the meta yaml will be the following
|
Host it somewhere, for instance as a gist and add into a devfile of your workspace
|
@tolusha, just wanted a confirmation, will java test runner actually work after installing it? Are there any restrictions that could prevent it from working? Edit: |
@thisHermit no, that issue has nothing to do with this one. |
@thisHermit missed the first part of your question, though. The extension should work, mostly. That said, there are parts of the VS Code API theia does not implement yet (or not in exactly the same way), so you'll need to test, I'm afraid. |
This is another extension that needs to be run together with jdt.ls. We really need a solution for mix-and-match jdt.ls extensions before we proceed here. |
I tried installing vscode-java-test (alongside vscode-java-debug and vscode-java) and I can't get the tests to run in my workspace. When I try to open the Test Explorer, I get an error in the notification area Could this be some missing VSCode API on our end? |
@ericwill do you run the vscode-java-test extension in the same Che plugin as vscode-java? The missing command handler could indicate that an extension bundle (probably provided by the test extension) is not found by jdt.ls. |
Yes they are running in the same Che plugin. There are some errors logged in the vscode-java/jdt-ls console: error.log. |
FWIW, it the java test runner seems to start up fine for the following combination in Theia master: redhat.java-0.62.0.vsix |
Further problems I've identified:
|
for 2. and 3. do you see errors reported ? |
@benoitf I'll be analysing these differences today and will let you know. |
Just found a case where there are no tests shown in the test explorer, even though "run all tests" correctly executes tests. Reopening the test explorer correctly shows the tests. Seems it's an timing/event problem. |
The problem with the code lenses is a bug in the test runner extension, it seems: "dispose" is called on TestCodeLensProvider, which disposes the event. Not quite clear why this would be observed in Theia and not Che Theia, though. Trying a fix to validate the theory. |
While I think that the "dispose" problem above is real, it turns out the problem I'm seeing is more subtle: the cause for the code lenses not showing up is that the The problem arises that monaco compares the currently opened file with a relative glob pattern in the DocumentSelector by using URI.fsPath, which in turn calls this method: https://github.com/microsoft/vscode/blob/90efeb4f2dc41827b382c8bb5da1c3abfff9459f/src/vs/base/common/uri.ts#L579 |
The problem loading the "pass", "running", etc. icons is that the front end is trying to load an icon with an URI like this: |
Issue
There seems to be no support for running Tests in Java on Che 7.
Adding the Java Test Runner extension would be a good solution to this problem as it would add support for both class level and function level tests.
Steps tried
kubectl exec $\{PLUGIN_REG_POD} -i -t -- /var/www/html/index_v2.sh v3 > /var/www/html/v3/plugins/index.json
did not work. It kept confusing the files by trying to find the file on my local machine.Help regarding any of the above solutions is much appreciated.
Here are the issues that are keeping this extension from working properly in Che:
[x] Support VS Code Standard Icons in Contributions eclipse-theia/theia#7634
[x] Support
Command
Type for StatusBarItem.command eclipse-theia/theia#8241[x] Cannot resolve
/hostedPlugin/
Resources from Sidecar Containers #17517The text was updated successfully, but these errors were encountered: