You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fails to load JUnit launch configuration in @ParameterizedTest that has any parameter whose type has generic types #1053
In the description of the extension page, it says it supports JUnit 5 (v5.1.0+)
When I click Run Test or Debug Test button above a @ParameterizedTest method that has any parameter whose type has generic parameter(s) - like List<Integer> or Map<Integer, Integer> - Java Test Runner says Error: Failed to load JUnit launch configuration. Strangely, it doesn't fail to launch tests if I click Run Test or Debug Test button above the class of @ParameterizedTest methods.
It successes in below code.
@ParameterizedTest
@MethodSource
Run Test | Debug Test // click any botton
void test(Object listObject) {
List<Integer> list = (List<Integer>) listObject;
...
}
static Stream<Arguments> test() {
return ...
}
But fails in below code.
@ParameterizedTest
@MethodSource
Run Test | Debug Test // click any botton
void test(List<Integer> list) {
...
}
static Stream<Arguments> test() {
return ...
}
It doesn't even fail in below code.
Run Test | Debug Test // click any botton
public class Test{
@ParameterizedTest
@MethodSource
void test(List<Integer> list) {
...
}
static Stream<Arguments> test() {
return ...
}
}
It doesn't even fail when you execute the test by gradle.
Activity
jdneo commentedon Sep 1, 2020
Seems that the parameter type of the test name should be
java.util.Listinstead ofjava.util.List<java.lang.Integer>Will make a fix later
jdneo commentedon Sep 3, 2020
Hotfix for this issue will release in early next week