postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Export collections with WebSocket and gRPC requests

Open deividas-pelakauskas opened this issue 2 years ago • 42 comments

Is there an existing request for this feature?

  • [X] I have searched the existing issues for this feature request and I know that duplicates will be closed

Is your feature request related to a problem?

There is no ability to export a collection with WebSocket requests.

Describe the solution you'd like

An ability to export a collection as a JSON file with WebSocket requests the same way it can be done with HTTP request collections.

Describe alternatives you've considered

No response

Additional context

No response

deividas-pelakauskas avatar Sep 09 '22 13:09 deividas-pelakauskas

@deividas-pelakauskas Thanks for the feature request. Collections with WebSocket and gRPC requests have limited functionality for now. We are tracking this internally.

Can you also share your workflow with the exported collection JSON?

codenirvana avatar Sep 09 '22 14:09 codenirvana

collection is published for customers

cervajs avatar Sep 22 '22 14:09 cervajs

Yes, it has the same use-case as with HTTP collections: you share it within your team and/or clients interested to integrate

sineed avatar Oct 07 '22 14:10 sineed

@codenirvana As others mentioned, would be incredibly useful if we could share the collection with third-parties to test out product based on WebSocket. Workflow:

  1. Create a WebSocket collection with messages
  2. Export WebSocket collection as a JSON file
  3. Third-party imports WebSocket collection to use

deividas-pelakauskas avatar Oct 12 '22 15:10 deividas-pelakauskas

Would be great to implement the same for gRPC collections as well!! Need this to run the collection via CLI, Pipeline.

Djikkac avatar Nov 14 '22 13:11 Djikkac

Current Workflow (simplified) based on REST API requests:

  1. Developers/Testers create a Postman Collection with REST API requests to test their REST API service app.
  2. The Postman Collection is saved into the code repository together with the app's source code.
  3. Commiting to the code repository triggers the CI/CD Pipeline that:
  • clones the code repository containing the app's source code and the Postman Collection with REST API requests
  • builds the app
  • executes the app's unit tests
  • runs the app
  • executes the component tests, which is the newman app running the Postman Collection with REST API requests targeted to the running app

Desired Workflow (simplified) based on gRPC API requests: Developers migrate the REST API service app to a gRPC API service app. They must be able to do all the above steps with the new gRPC API service app, which are:

  1. Developers/Testers create a Postman Collection with gRPC API requests to test their gRPC API service app.
  2. The Postman Collection is saved into the code repository together with the app's source code.
  3. Commiting to the code repository triggers the CI/CD Pipeline that:
  • clones the code repository containing the app's source code and the Postman Collection with gRPC API requests
  • builds the app
  • executes the app's unit tests
  • runs the app
  • executes the component tests, which is the newman app running the Postman Collection with gRPC API requests targeted to the running app

adimoi avatar Jan 04 '23 18:01 adimoi

We also save Postman collections in version control, so being able to export grpc-based collections would be great!

l3ender avatar Jan 26 '23 19:01 l3ender

I would also like this feature as it will be very useful (i also use websocket events in Postman)

Thomas-1985 avatar Feb 15 '23 07:02 Thomas-1985

We could really use this feature too.

mdemler avatar Mar 10 '23 01:03 mdemler

+1

luisbraga-msg avatar Mar 27 '23 13:03 luisbraga-msg

+1

duartecaldascardoso avatar Mar 27 '23 13:03 duartecaldascardoso

+1

kavithamadhavaraj avatar Mar 31 '23 09:03 kavithamadhavaraj

+1

Brettm247 avatar Apr 04 '23 18:04 Brettm247

+1

alankleindev avatar Apr 05 '23 00:04 alankleindev

+1

shubhwip avatar Apr 11 '23 14:04 shubhwip

+1

MaksimKiselev avatar Apr 13 '23 15:04 MaksimKiselev

+1

trwalker avatar Apr 14 '23 16:04 trwalker

+1

devfreitag avatar Apr 28 '23 20:04 devfreitag

+1

julpod avatar May 25 '23 04:05 julpod

+1

I'm definitely in for that. It would allows us to share a collection with third parties without having to invite every single one of them to our team.

noreading avatar May 31 '23 06:05 noreading

I actually need that feature, I must find other alternative

jhernandez-sps avatar May 31 '23 15:05 jhernandez-sps

QOL feature that definitely needs to be added!

z4c777 avatar Jun 06 '23 15:06 z4c777

This is a big deal. Combining Protocol Buffers with gRPC unlocked a world of elegance in almost all languages (autogenerated go, python, javascrript, docs, swagger, validations, envoy proxies, etc.). If the Postman Collection SDK supports gRPC one could easily generate a Postman Collection directly from the protos. Something along the lines of proco-gen-postman would be amazing.

jankrynauw avatar Jun 08 '23 07:06 jankrynauw

Is there any active work on the subject? Or roadmap plans?

andife avatar Jun 16 '23 21:06 andife

We are also interested in this feature!

rizi avatar Jun 26 '23 07:06 rizi

@codenirvana Can you give us an update on whether this feature has been added to the roadmap? WebSocket and gRPC requests exports when run with newman gives us a lot of power for doing integration tests for all sorts of applications.

jl-beast avatar Jun 30 '23 14:06 jl-beast

+1 to this feature please! Extremely needed, and does not make sense why we have it for http collections and not for websocket connections. If we can export http, there are defintely use cases to export socket collections as well. so much much needed feature

Hamma111 avatar Jul 10 '23 22:07 Hamma111

@adimoi @Hamma111 @jl-beast @jankrynauw @jhernandez-sps @noreading @mdemler @Thomas-1985 @l3ender guys! - Seems like this feature is not going to be added anytime soon! until then for regression runs using new man this helps!

https://pypi.org/project/grpcrest/ - Try out this plugin this converts gRPC into a rest api using - grpcurl command line tool - for more details refer this -

Key Components of the Plugin:

  1. gRPC <> Rest API: The plugin takes gRPC server, service, and method names as headers. The body typically contains information such as the payload, and any additional metadata to be sent can be provided as Params in the Rest API.

  2. Request Parsing: The plugin parses the headers, metadata, and request payload provided, extracting the necessary information like the target service, method name, metadata, and payload data. This information will be used to construct the corresponding grpcurl command.

  3. gRPCurl Command Generation: Based on the parsed elements, the plugin dynamically generates the grpcurl command that is then used to invoke the gRPC request. It assembles the necessary flags, headers, and payload, ensuring compatibility with the grpcurl tool.

  4. Command Execution: Once the grpcurl command is generated, the plugin executes it on the terminal, leveraging the subprocess module in Python. The plugin captures the command output and returns it as the response to the original REST API request.

How to use the GRPC-to-REST Plugin?

The plugin can be downloaded from the following link: https://pypi.org/project/grpcrest/ Use the following commands in your terminal after installing Python:

  • pip install grpcrest: to install the plugin
  • start-grpc-rest (Default Port number is 5000): to start the plugin

The above commands will start a simple Flask-based web server on localhost. Once the plugin is up and running, use the HTTP URL along with /invoke_gRPC in the HTTP Post request. Provide all the required Server, Service, Method, Meta data, and the request payload in the Body, headers, and Params section, and invoke the HTTP request to get a response from the gRPC API.

TO START THE PLUGIN : pip install grpcrest start-grpc-rest-5000

ramprakash-CA avatar Jul 21 '23 18:07 ramprakash-CA

As we are using grpc more and more with our services, it would be extremely helpful to have this feature!

gfiecht avatar Jul 28 '23 16:07 gfiecht

+1

this feature will be really helpful

adzimzf avatar Aug 14 '23 09:08 adzimzf