A request in gRPC is similar to a function call. ReadyAPI sends a request with a number of parameters in the payload, and a server responds with the function result.
In gRPC, there are four operation types. Currently, ReadyAPI supports only one of them - Unary operations. The Unary operations work as simple requests: ReadyAPI sends a single request and waits for a single response. The Unary operations are configured through the API Connection test step:
Using Linked Schemas
When importing Proto3 Files, we support all linked gRPC schemas while testing the gRPC service in that proto3 file and test gRPC services with external links.
ReadyAPI also supports importing
.proto files that contain Google protocol buffers. When importing
.proto files that are using Google protocol buffers, the import lines in the source
.proto file are looking for the
.proto files from the Google protocol buffers.
When importing Google protocol buffers, it is recommended to use the latest version of these protocol buffers, which can be downloaded from here. After downloading and extracting the archive, navigate to the
include folder and copy the entire
.proto file that you want to use. Note that the import statement has to be at the top of the file and it is using the relative path to look for the
.proto files that are imported.
Another way to import the Google protocol buffers is to edit the import statements in the source
.proto file so that it looks in the same folder for the Google protocol buffers. This can be done in the following way:
Then, with both
test_with_GoogleWrappers.proto and the protocol buffer files in the same folder, the import works as well. Note that not all the protocol buffer files are used all the time and they can be chosen according to the needs.