-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] The SummaryPrinter should only depend on api classes #1361
Conversation
A plugin interface like the SummaryPrinter should only depend on classes in cucumber.api packages.
c7c1fb0
to
05774ef
Compare
I am thinking we should remove the SummaryPrintingInterface from the public API all together. Given the current interface there are two reasonable implementations and we're providing them both. Custom implementations can listen to the the event stream like the other plugins. |
Maybe we can combine the whole thing with |
2cacbb2
to
118e732
Compare
118e732
to
91d3f03
Compare
Okay. Removing the summary printer from the public API was a bit too much. But I've managed to pull stats and UndefinedStepsTracker out of the runtime. It gets a bit messy around Android and PaxExam but that is okay I think. |
I can think of another reasonable implementation for the SummaryPrinter interface, that is to only print the snippets. When a runner class is used the NullFormatter is the default formatter for the console. One could argue that when using a runner class maven/gradle/testng should take care of the test summary and test errors, so the only thing Cucumber-JVM should provide is the snippets. That leads to the question which helpers Cucumber-JVM should provide to simplify the development of different types of plugins, like classes as Stats, UndefinedStepsTracker, TestSourceModel etc. |
I've been having similar thoughts. The summary plug is really suited to the commandline runner. All the other runners have their own reporting mechanism. However the ports and adapters pattern we're using makes the commandline runner (through runtime options) the nucleus for all adapters. It should be the Runtime that is the nucleus. It's why I had to add noSummaryPrinter to get rid of the default. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The
SummaryPrinter
interface should only depend on api classesDetails
A plugin interface like the
SummaryPrinter
, which users can implement, should only depend on classes incucumber.api
packages.Motivation and Context
API classes should not leak internal interfaces.
How Has This Been Tested?
Tested by the automated test suite.
Types of changes
Checklist: