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

Support --out http://.... #1395

Merged
merged 24 commits into from
Mar 13, 2020
Merged

Support --out http://.... #1395

merged 24 commits into from
Mar 13, 2020

Conversation

aslakhellesoy
Copy link
Contributor

Summary

Enables Cucumber to send results directly to a HTTP server

Details

Converts a string starting with ^http to a custom IO object that performs a HTTP request

Motivation and Context

We want to make it easy for users to publish their results to external services. Allowing users to specify a URL to send results to should help.

I'm fully aware that this is a fragile solution:

  • It will fail the execution if the server is unavailable
  • Doesn't support retry
  • Doesn't support proxies

We will also provide guidelines about alternative, more robust mechanisms to publish results, such as:

  • Write messages to a file
    • Use cURL to publish after cucumber is done
    • Write messages to the CI server's "artifacts" directory and have a process somewhere else that can download them

How Has This Been Tested?

With WEBrick

Screenshots (if appropriate):

Types of changes

  • Refactor (code change that does not change external functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@aslakhellesoy aslakhellesoy added the ⚡ enhancement Request for new functionality label Feb 28, 2020
@aslakhellesoy aslakhellesoy marked this pull request as ready for review March 6, 2020 16:32
@aslakhellesoy
Copy link
Contributor Author

@vincent-psarga any idea why validate-cck is failing? I've merged in master.

I'll take a look at the JRuby failures...

Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Q: a short question on in-progress code.

lib/cucumber/formatter/http_io.rb Outdated Show resolved Hide resolved
@vincent-psarga
Copy link
Contributor

@vincent-psarga any idea why validate-cck is failing? I've merged in master.

I think it's due to the removal of JSON gem. I'll fix that.

@vincent-psarga
Copy link
Contributor

You should be able to merge master again and get the build working (except for Windows for the moment)

@vincent-psarga vincent-psarga merged commit aba8a62 into master Mar 13, 2020
@vincent-psarga vincent-psarga mentioned this pull request Apr 28, 2020
2 tasks
vincent-psarga added a commit that referenced this pull request Apr 28, 2020
@luke-hill luke-hill deleted the out-url branch August 22, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants