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
298 stars 129 forks source link

Q: how to get test results output in integrated terminal or debug console ? #1601

Closed matter-it-does closed 1 year ago

matter-it-does commented 1 year ago

Yet it's the only place to find stacktrace and assertion errors. I don't use test output peek view.

Is there a way to redirect the output in debug console or terminal?

Expose lists of tests to be usable in inputs of task.json #1405 is still desired for me.

Here's a test that shows perf issues.

import static org.junit.Assert.assertEquals;

import java.util.stream.IntStream;
import java.util.stream.Stream;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

public class BaarFTest {

    static Stream<Integer> filler() {
        return IntStream.range(0, 100).mapToObj(i -> i);
    }

    @ParameterizedTest
    @MethodSource("filler")
    void test(int a) {
        assertEquals(1, 2);
    }

}
jdneo commented 1 year ago

Could you give more detail about The performance is not satisfactory for parameterized tests in the test results output.?

matter-it-does commented 1 year ago

Scrolling is laggy with lots of output.

jdneo commented 1 year ago

Scrolling is laggy with lots of output.

Could you give some more details? Like a video, your vscode version and details of your machine.

Looks like this issue should be handled by VS Code team, I can help you report this to them if those information is available.

matter-it-does commented 1 year ago

there you go. Version: 1.81.1 Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 OS: Darwin x64 20.5.0

Machine is macbook pro 16" intel 2.6 GHz 6-Core Intel Core i7 16 GB 2667 MHz DDR4

https://github.com/microsoft/vscode-java-test/assets/76812421/de44873b-ea58-474b-b03e-d03bb1dc27fa

jdneo commented 1 year ago

Tried your snippet on my windows and I did not observe lags.

https://github.com/microsoft/vscode-java-test/assets/6193897/e6a4a226-ecc6-4749-a7d1-ba3350260f55


Update:

After trying it on both VS Code Stable and Insiders, I found that it was a little bit laggy in Stable. Insiders feels much better.

Have you tried it in latest VS Code Insiders?

github-actions[bot] commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

matter-it-does commented 1 year ago

@jdneo yeah the performance is better in this release.

Version: 1.82.2 Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d Date: 2023-09-14T05:59:47.790Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin x64 20.5.0

jdneo commented 1 year ago

Thank you for the update.