The examples above demonstrate how the httpyac can be used in the automated CI testing using the httpyac CLI and exit codes check.
This is an example of how to use httpyac for the gRPC bidirectional stream testing.
To run the tests you need to clone the repository, install httpyac, and execute the following command:
httpyac *.grpc --all
This will run testbidiFail.grpc
and testbidiSuccess.grpc
test files.
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 hello.proto test endpoint is alive.
The command will exit with 0 code in case of success.
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.
To check the exit code you can run the echo $?
command which shows the last command exit code.