Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Wrong test name displayed for JUnit 4 parameterized test

Open
#1,562 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, typescript
Domain
testing-qa

Research direction

Start in src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts at the linked code near line 457. Reproduce the JUnit 4 parameterized test with inputs such as "()" and "(()", then inspect how the displayed name is derived from the parameterized name. Done means names containing rounded brackets are handled correctly without breaking the other sample inputs.

Written by the indexing model from the issue text.

Description

ai-triaged bug help wanted investigating junit low-priority ui

Sample code:

@RunWith(Parameterized.class)
public class ParameterizedWithNameTest {

    @Parameter
    public int expected;

    @Parameters(name = "{index}: expect={0}")
    public static Collection<Object> data() {
        // If using the name annotation param and one of the inputs has a rounded
        // bracket, e.g. @Parameters(name = "test({index})"), then the test name needs
        // to be properly handled.
        return Arrays.asList(1, 2, "normalString", "()", "(()");
    }

    @Test
    public void test() {
        assertEquals(expected, 1);
    }
}

Run the test will get:

image

Root cause is that here it's just check the position of (:
https://github.com/microsoft/vscode-java-test/blob/e7c10db82a0cbd0d8d11515fe51153a2e00cb584/src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts#L457

Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 2h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-java-test

All issues in microsoft/vscode-java-test

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.