JUnit 5 ParameterizedTest results not properly flagged for complex arguments

Open
#1,603 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
testing

Research direction

Start by reproducing the issue with the ExampleTest class, its ParameterizedTest, and the MethodSource returning double[] arguments. Trace how these parameterized results are represented in the test view, then verify that successful cases show a green check and a dropdown containing each test case.

Written by the indexing model from the issue text.

Description

ai-triaged bug help wanted investigating junit test-discovery ui

When parameters for a ParameterizedTest is provided by MethodSource that return stream of Arguments of non primitive type e.g. double[], the test results are not flagged with a green check for success test. Instead, it shows a grey circle without a dropdown that show test result for each test case.

image

Example Code:

public class ExampleTest {
  @ParameterizedTest
  @MethodSource("parameters")
  void shouldDoParameterizedTest(double[] s) {
    assertNotNull(s[0]);
    assertNotNull(s[1]);
  }

  static Stream<Arguments> parameters() {
    return Stream.of(Arguments.of(new double[] {
        0.01d, 0.05d
    }), Arguments.of(new double[] {
        0.02d, 0.04d
    }));
  }
}
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.