Skip to content
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

Publish option #1424

Merged
merged 45 commits into from
Sep 10, 2020
Merged

Publish option #1424

merged 45 commits into from
Sep 10, 2020

Conversation

aslakhellesoy
Copy link
Contributor

@aslakhellesoy aslakhellesoy commented Sep 1, 2020

This implements #1423

@aslakhellesoy
Copy link
Contributor Author

We have liftoff! Check this out: https://reports.cucumber.io/reports/7d8ac0d5-738b-4250-bb02-02feaea95aa7

@davidjgoss
Copy link
Contributor

Nice!

Just noticed it reports as having been run 51 years ago - are we doing some thing wrong with time stamps?

@aslakhellesoy
Copy link
Contributor Author

Yes I guess so! I’ll have a look at that tomorrow.

dependency-lint.yml Outdated Show resolved Hide resolved
│ More information at https://reports.cucumber.io/docs/cucumber-js │
│ │
│ To disable this message, add this to your ./cucumber.js: │
│ module.exports = { default: '--publish-quiet' } │
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel conflicted about this. This feels annoying to me as a user. Certainly glad we implemented the CLI option to suppress it but why does this need to be outputted a user runs the tool without publish?

Could this be a message shown on install / the help page / somewhere visible on the README?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've already implemented it this way in Cucumber-Ruby and Cucumber-JVM. So far we've not heard any complaints, just positive feedback.

We want as many people as possible to discover this new functionality, and showing it after the run will reach more people than if it's only shown on install and in documentation (which many people never look at).

Let's see if anyone complains.

Copy link
Contributor

@michael-lloyd-morris michael-lloyd-morris Oct 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me. I'll complain. I'm beginning the setup of a test suite and this message is annoying to look at. I tried dropping the module.exports into my step definition file but it didn't get rid of this message. So how do I get rid of this?

And to be clear, I appreciate the thought - but I'm working on a corporate project which will NEVER publish test results onto a public server for security reasons, so I'd rather just have this reminder off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried dropping the module.exports into my step definition file

You're not supposed to drop that in your step definition files, but in your global cucumber.js config file at the root of your project.

How can we make this harder to misunderstand @michaelm-rsi?

I'm working on a corporate project which will NEVER publish test results onto a public server for security reasons.

I completely understand that, which is why we've added an option to turn this off. We're also considering making Cucumber Reports available as a server you can install on-prem.

@vincent-psarga vincent-psarga merged commit fede5c8 into master Sep 10, 2020
Adam-ARK pushed a commit to Adam-ARK/cucumber-js that referenced this pull request Oct 21, 2020
* Added scenario for --publish option

* Add --publish option

* Make publish scenario pass with cheating

* Add a ReportServer to the World

* Start TDDing HttpStream

* Write HttpStream in a temporary file

* Pipe tempfile to http request

* Wait for request to finish before closing server

* Capture body on server

* Wait for the server to receive all the body

* Add new test for GET/PUT redirect between lambda and S3

* Follow Location after get

* Fix dependency lint

* Cleanup

* Refactor

* Extract HttpStream

* Extract FakeReportServer

* Use FakeReportServer in publish.feature

* Add failing spec for --publish

* Scenario is passing

* Print response body in errors. Send content-length

* Added tests for outputting a banner from the report server content

* http_stream logs response from server to console

* Enable publishing report with ENV var

* Fix lint error

* Start adding support for CUCUMBER_PUBLISH_TOKEN

* Publish with Authorization header when CUCUMBER_PUBLISH_TOKEN is set

* Restore newline

* Add scenarios describing the banner advertising --publish

* Start implementing banner display when --publish is not set

* Add isPublishing attribute to configuration

* Add test checking is suppressPublicationBanner is set + added --publish-quiet option

* Print banners to stderr, fixed import of cucumber

* Adapt banner to cucumber.js

* Add ANSI colours to banner

* Extract banner code to its own file

* more maintainable publish banner

* revert dep lint config, lint fix banner

* Use arrow function

* Use doesHaveValue in conditionals. Update comment about 3xx redirects

* Use valueOrDefault instead of boolean expression

* Update changelog

Co-authored-by: Seb Rose <[email protected]>
Co-authored-by: Christophe Bliard <[email protected]>
Co-authored-by: Vincent Pretre <[email protected]>
Co-authored-by: Charles Rudolph <[email protected]>
Adam-ARK pushed a commit to Adam-ARK/cucumber-js that referenced this pull request Oct 21, 2020
* Added scenario for --publish option

* Add --publish option

* Make publish scenario pass with cheating

* Add a ReportServer to the World

* Start TDDing HttpStream

* Write HttpStream in a temporary file

* Pipe tempfile to http request

* Wait for request to finish before closing server

* Capture body on server

* Wait for the server to receive all the body

* Add new test for GET/PUT redirect between lambda and S3

* Follow Location after get

* Fix dependency lint

* Cleanup

* Refactor

* Extract HttpStream

* Extract FakeReportServer

* Use FakeReportServer in publish.feature

* Add failing spec for --publish

* Scenario is passing

* Print response body in errors. Send content-length

* Added tests for outputting a banner from the report server content

* http_stream logs response from server to console

* Enable publishing report with ENV var

* Fix lint error

* Start adding support for CUCUMBER_PUBLISH_TOKEN

* Publish with Authorization header when CUCUMBER_PUBLISH_TOKEN is set

* Restore newline

* Add scenarios describing the banner advertising --publish

* Start implementing banner display when --publish is not set

* Add isPublishing attribute to configuration

* Add test checking is suppressPublicationBanner is set + added --publish-quiet option

* Print banners to stderr, fixed import of cucumber

* Adapt banner to cucumber.js

* Add ANSI colours to banner

* Extract banner code to its own file

* more maintainable publish banner

* revert dep lint config, lint fix banner

* Use arrow function

* Use doesHaveValue in conditionals. Update comment about 3xx redirects

* Use valueOrDefault instead of boolean expression

* Update changelog

Co-authored-by: Seb Rose <[email protected]>
Co-authored-by: Christophe Bliard <[email protected]>
Co-authored-by: Vincent Pretre <[email protected]>
Co-authored-by: Charles Rudolph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants