Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Core] Add UnusedStepsSummaryPrinter #1648
Adds a plugin to find and report on unused steps.
As discussed in #1634 it uses the new StepDefinedEvent to locate all registered steps, and prints a summary of unused steps to the argument file.
Motivation and Context
Allows to easily find unused steps, which might be indicative of removed functionality or missed test coverage.
How Has This Been Tested?
Not yet; as @mpkorstanje indicated some hesitation on whether this would warrant adoption. This PR is to record that discussion, and will be updated depending on the outcome. Same goes for the current Java8 baseline, so it might need to target a future version rather than the next.
Screenshots (if appropriate):
Types of changes
The current output is:
Looks good. I was initially thinking we should use the same format as the default summary printer, but we may as well add it to the default summary printer. That way there is no need for an additional
So let's add it to the default summary printer!
Running a selection is indeed why I had implemented this as a separate plugin so far; thanks for the suggestions; I've updated the plugin accordingly. Not really sure how to cover this with tests, and/or if we're still on track for an eventual merge..
Thanks for directly applying your own suggestions.. as a note: I'd used package private modifier as the inner class event handlers otherwise need to use syntactic accessors to access the private fields (or so my IDE tells me), but the code should work fine as it is now, and probably clearer.
Shall I merge? Or feel free to merge of that's faster.. :) great to see this added, saves me copy and pasting it where I need it.