microsoft / microsoft/vscode-java-test
JUnit 5 ParameterizedTest results not properly flagged for complex arguments
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 18
Description
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.
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
}));
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100