-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[Core] Add --publish option #2070
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is a work in progress.
I'm not convinced that reusing the messages
plugin is the correct solution here. As a result the PluginFactory
now has to be aware of the details of the --publish
option. It might be better to introduce a new plugin instead.
And for the todo list the publish option should also be available as an system variable and a property in cucumber.properties
and junit-platform.properties
. To make this possible I would forgo using addPlugin(...)
and instead consider adding a publish
flag to RuntimeOptions
Also some minor comments below.
core/src/main/java/io/cucumber/core/options/CucumberMessageStoreUrl.java
Outdated
Show resolved
Hide resolved
junit/src/main/java/io/cucumber/junit/JUnitCucumberOptionsProvider.java
Outdated
Show resolved
Hide resolved
For a bit of future proving. Consider using |
core/src/main/java/io/cucumber/core/options/CucumberMessageStoreUrl.java
Outdated
Show resolved
Hide resolved
(Only via Environment and CLI)
@@ -153,3 +153,6 @@ cucumber.snippet-type= # underscore or camelcase. | |||
Each property also has an `UPPER_CASE` and `snake_case` variant. For example | |||
`cucumber.ansi-colors.disabled` would also be understood as | |||
`CUCUMBER_ANSI_COLORS_DISABLED` and `cucumber_ansi_colors_disabled`. | |||
|
|||
|
|||
TODO: Document --publish and new properties here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Document --publish and new properties here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoyingly this documentation is also duplicated in cucumber-junit-platform-engine
.
junit-platform-engine/src/main/java/io/cucumber/junit/platform/engine/Constants.java
Show resolved
Hide resolved
@@ -93,6 +93,14 @@ | |||
*/ | |||
String[] plugin() default {}; | |||
|
|||
/** | |||
* Publish report to https://reports.cucumber.io. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be consistent with the documentation for the options with the same name
@@ -93,6 +93,14 @@ | |||
*/ | |||
String[] plugin() default {}; | |||
|
|||
/** | |||
* Publish report to https://reports.cucumber.io. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be consistent with the documentation for the options with the same name
Documentation aside I think we've got everything important now. I'd like to get rid of |
We are using the `Runtime.Builder` to construct runtimes for various tests. To reduce the noise in the logs the publish feature should be off unless explicitly enabled. The publish plugin feature is enabled for the main, junit and testng runners.
…domain is now available.
we have a several sources of documentation.
And when making a new release I often distil the release notes from the git log and merge requests. However currently neither the git log, nor the merge request describe how this feature works in full. This leaves a gap in the documentation making it harder for future contributors to work out how we intended something to work. This will in turn either result in having to answer questions or people failing to contribute. Cucumber JVM is configured to squash merge all commits. So when merging in Cucumber-JVM you'll get the chance to edit the commit message. I usually use this as an opportunity to update the PR to describe the why and copy this into the commit message. See also How to Write a Git Commit Message |
👍 I'll deal with this tomorrow before the release. |
This pull request introduced
--publish
- a simplified interface for publishing reports, similar to cucumber/cucumber-ruby#1452The report is printed to STDERR, because surefire suppresses STDOUT. The banner is only printed when the URL matches the message store URL. The base URL is hard-coded to
https://messages.cucumber.io/api/reports
, but can be overridden by defining theCUCUMBER_PLUGIN_PUBLISH_URL
environment variable.TODO:
/api/reports
to the base url, and let users define the full URL withCUCUMBER_PLUGIN_PUBLISH_URL
--publish
so users can more easily discover this feature.CUCUMBER_PLUGIN_PUBLISH_TOKEN
)Screenshots: