Skip to content

Conversation

@kwuerl
Copy link
Contributor

@kwuerl kwuerl commented Aug 10, 2019

This PR fixes the Problem mentioned here: https://community.sonarsource.com/t/number-of-unit-tests-is-not-measured-with-nested-junit-5-tests/4255/3

I added a fix so that testcases in inner class reports are new igored if they where already present in the parent class without completely ignoring test reports from inner classes.

This is neccessary due to the fact that the reports created by the gradle junit5 test runner creates seperate reports for @nested inner class test cases.

As the name property in UnitTestResult seems to be only ever empty in the unit tests i added a default test name (as UUID) to be able to identify all UnitTestResults by name properly.

@Godin Godin force-pushed the master branch 2 times, most recently from 118e931 to 0551c93 Compare September 16, 2019 17:56
@ghost ghost added the External Contribution label Oct 1, 2019
@ghost ghost added the Enhancement label Nov 6, 2019
@ghost
Copy link

ghost commented Nov 8, 2019

Hey @kwuerl ,

First, thanks a lot for the high quality of your contribution, and sorry for the time it took us to get back to you. Indeed, this case has never been properly covered. Your contribution fixes this!

I created the corresponding ticket to document the change and have it part of our release note: SONARJAVA-3222

I also rebased your PR on top of our master branch, and open another PR containing your duplicated (and squashed) changes, renamed according to our ticket.

If everything goes fine on QA/Quality Gate side, I'll merge it.
The fix will then be part of the next release of SonarJava: 6.0.

Cheers,
Michael

@ghost
Copy link

ghost commented Nov 8, 2019

Merged the squashed commits. Thanks again!

@ghost ghost closed this Nov 8, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant