microsoft / vscode-java-test

Run and debug Java test cases in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test
Other
297 stars 132 forks source link

Support test coverage for unmanaged folder projects #1671

Closed jeuzee closed 8 months ago

jeuzee commented 9 months ago

I installed VSCode Insiders and all necessary extensions, also I have latest JDK installed, but when I run Tests with coverage it goes through all the tests, but Test Coverage field is completely empty, why/how do I fix that?

jdneo commented 8 months ago

There are a couple of updates for the test coverage feature from VS Code. Do you still have this issue now?

If yes, would you mind sharing more information please? like some screenshots. gifs, sample project...

jeuzee commented 8 months ago

There are a couple of updates for the test coverage feature from VS Code. Do you still have this issue now?

If yes, would you mind sharing more information please? like some screenshots. gifs, sample project...

First of all, I updated VSCode Insiders to latest version: Screenshot_1

I also have all extensions installed in pre-release version: Screenshot_2

And when I click "Run tests with coverage" I get no coverage: Screenshot_3

jdneo commented 8 months ago

Would you mind sharing a sample project for this issue?

jeuzee commented 8 months ago

Would you mind sharing a sample project for this issue?

No, unfortunately I can't.

jdneo commented 8 months ago

Is there any errors in the server log? (Trigger Java: Open Java Language Server log file)

jeuzee commented 8 months ago

Is there any errors in the server log? (Trigger Java: Open Java Language Server log file)

No, I can't find any error, maybe if you could specify what exactly error might be.

jeuzee commented 8 months ago

Actually, I can share another project: test.zip

jdneo commented 8 months ago

I see.

Your project is an unmanaged Folder project (without build tool like Maven/Gradle/...), right?

It's not supported right now. But I'll check how we can support it.

Thanks for reporting the issue!

jdneo commented 8 months ago

@jeuzee

Made some progress. Would you mind try this vsix, should work now:

vscode-java-test-0.40.2024031906.vsix.zip

jeuzee commented 8 months ago

@jeuzee

Made some progress. Would you mind try this vsix, should work now:

vscode-java-test-0.40.2024031906.vsix.zip

Umm, where do I suppose to put that file? And yeah, I am not using Maven/Gradle currently.

jdneo commented 8 months ago

You need to unzip it, and then manually install it:

image

jeuzee commented 8 months ago

Yes, now its working, thank you!

jdneo commented 8 months ago

Fixed by https://github.com/microsoft/vscode-java-test/commit/a4a28c8615de7069ffa6d658b13ba71d1f11389f