vscode-java-test icon indicating copy to clipboard operation
vscode-java-test copied to clipboard

FR: Parameterized tests should show contents of arguments instead of instance name

Open matter-it-does opened this issue 3 years ago • 1 comments

For an arrangement like this, sidebar of the tests should be more informative about the paramters. but instead it's just instance name

image
static class BLAH{
    int num;
    public BLAH(int input){
      num = input;
    }
  }
  static Stream<Arguments> bar(){
    return Stream.of(Arguments.of(new BLAH(1)));
  }
  @ParameterizedTest
  @MethodSource("bar")
  void foo(
      BLAH requestBody) {
  }

If there's a toString method, maybe it can be used to get contents of the parameters ?

matter-it-does avatar Jun 21 '22 04:06 matter-it-does

I didn't look deep into this issue, but I guess this comes from JUnit 5 itself.

If you look at the behavior in Eclipse/intelliJ, they both display the instance name:

image

image

jdneo avatar Jun 22 '22 08:06 jdneo