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

Test Results tab display meaningless text - Ubuntu Dekstop 22 #1683

Closed artidataio closed 7 months ago

artidataio commented 7 months ago

The following image is the output of test result in IntelliJ: Screenshot from 2024-04-22 22-31-55 As we can see there are some println output, namely:

Whereas, the image below show the output of test result tab in the VScode:

Screenshot from 2024-04-22 22-31-14

As we can see both image refer to the same class test namely BetaTest. But, VScode doesn't print the same output as IntelliJ. The text is also kinda mess and meaningless.

Is this working as per intended? Am I missing something here? As stated in the title, I am running Ubuntu Desktop 22 with VScode 1.88.1.

The code below is a copy of BetaTest.java file:

package io.artidata;

import org.junit.jupiter.api.*;

class BetaTest {
    static int number = 14;

    BetaTest() {
        number *= 2;
        System.out.println("Learning Test LifeCycle");
    }

    @BeforeAll
    static void method3() {
        number += 11;
    }

    @BeforeEach
    void method2() {
        number -= 4;
    }

    @AfterAll
    static void method4() {
        number /= 3;
        System.out.println("End of Test LifeCycle");
    }

    @AfterEach
    void method5() {
        System.out.println(number);
    }

    @Test
    void method6() {
        number += 9;
    }
}
jdneo commented 7 months ago

Duplicated with https://github.com/microsoft/vscode-java-test/issues/1588