Developer-Oriented Amplification for the Test Cube Plugin #993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request contains the adaptations I made to DSpot to let it generated smaller and better explained (though maybe weaker) test cases for the Test Cube IntelliJ Plugin.
As it contains many changes, I want to summarize and explain the main points:
New "main" class
DevFriendlyAmplification
This class is analogous to the class
DSpot
, orchestrates the developer friendly test amplification and is called fromDSpot
when the option--dev-friendly
is passed.In a nutshell, the developer-friendly amplification:
ExtendedCoverageSelector
to keep test cases that cover more instructions on any lineNew
ExtendedCoverageSelector
+ connected classesSelects test cases that cover more instructions (than the original test suite) on any line of code and provides a detailed report in which lines how many more instructions are covered.
The selector uses the new, more detailed information from test-runner 2.3.0
Fine-grained options for generated comments
I extended the comment generation to each amplifier.
In addition, the
JacocoCoverageSelector
and theExtendedCoverageSelector
can add JavaDoc comments about the improved coverage above each test case.The new
CommentEnum
allows to configure which comments should be included (None, only Amplifiers, only Coverage, all comments).Tests of new functionality
This PR includes the following tests:
--dev-friendly
optionExtendedCoverageSelector
, especially calculation of the difference in coverage per line