https://github.com/geekbrother/httpyac-grpc-bidi-test
This is an example of how to use httpyac for the gRPC bidirectional stream testing.
https://github.com/geekbrother/httpyac-grpc-bidi-test
automated-testing ci grpc grpc-stream httpyac test testing
Last synced: about 2 months ago
JSON representation
This is an example of how to use httpyac for the gRPC bidirectional stream testing.
- Host: GitHub
- URL: https://github.com/geekbrother/httpyac-grpc-bidi-test
- Owner: geekbrother
- Created: 2022-05-18T11:26:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T18:59:49.000Z (about 3 years ago)
- Last Synced: 2025-02-13T15:40:58.995Z (4 months ago)
- Topics: automated-testing, ci, grpc, grpc-stream, httpyac, test, testing
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gRPC bidirectional stream testing using httpyac tool
## What the purpose of this
The examples above demonstrate how the [httpyac](https://httpyac.github.io/) can be used in the automated CI testing
using the httpyac CLI and exit codes check.## Test examples
This is an example of how to use [httpyac](https://httpyac.github.io/) for the gRPC bidirectional stream testing.
To run the tests you need to clone the repository, [install httpyac](https://httpyac.github.io/guide/installation_cli.html), and execute the following command:
```
httpyac *.grpc --all
```This will run [`testbidiFail.grpc`](https://github.com/geekbrother/httpyac-grpc-bidi-test/blob/main/testbidiFail.grpc) and [`testbidiSuccess.grpc`](https://github.com/geekbrother/httpyac-grpc-bidi-test/blob/main/testbidiSuccess.grpc) test files.
### `testbidiSuccess.grpc`
Demonstrates an success example of equality test for the gRPC bidirectional stream
messages send and recieved.
Those tests will pass in case of [grpcb.in](https://github.com/moul/pb/blob/master/hello/hello.proto)
*hello.proto* test endpoint is alive.The command will exit with 0 code in case of success.
### `testbidiFail.grpc`
Demonstares how the test fail when one of the recievied messages is not equal to
the expected one.This test will exit with code greater than 0.
## Check the exit code
To check the exit code you can run the `echo $?` command which shows the last command exit code.