postman-app-support
postman-app-support copied to clipboard
Export collections with WebSocket and gRPC requests
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 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?
collection is published for customers
Yes, it has the same use-case as with HTTP collections: you share it within your team and/or clients interested to integrate
@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:
- Create a WebSocket collection with messages
- Export WebSocket collection as a JSON file
- Third-party imports WebSocket collection to use
Would be great to implement the same for gRPC collections as well!! Need this to run the collection via CLI, Pipeline.
Current Workflow (simplified) based on REST API requests:
- Developers/Testers create a Postman Collection with REST API requests to test their REST API service app.
- The Postman Collection is saved into the code repository together with the app's source code.
- 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:
- Developers/Testers create a Postman Collection with gRPC API requests to test their gRPC API service app.
- The Postman Collection is saved into the code repository together with the app's source code.
- 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
We also save Postman collections in version control, so being able to export grpc-based collections would be great!
I would also like this feature as it will be very useful (i also use websocket events in Postman)
We could really use this feature too.
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+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.
I actually need that feature, I must find other alternative
QOL feature that definitely needs to be added!
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.
Is there any active work on the subject? Or roadmap plans?
We are also interested in this feature!
@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.
+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
@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:
-
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.
-
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.
-
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.
-
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
As we are using grpc more and more with our services, it would be extremely helpful to have this feature!
+1
this feature will be really helpful