$grpc_testtool -h
Usage of grpc_testtool:
-addr string
the grpc server address (default "localhost:50051")
-gen string
testcase path, new testcase with null value
-import string
import path of proto, split with ',' (default "./protos")
-proto string
proto path (default "./protos")
-testcase string
testcase path(include json files) (default "./testcase")
% dynamic_grpc_server -h
Usage of dynamic_grpc_server:
-gen string
testcase path, new testcase with null value
-import string
import path of proto, split with ',' (default "./protos")
-port int
The server port (default 50051)
-proto string
proto path (default "./protos")
-testcase string
testcase path(include json files) (default "./testcase")
% ./http2grpc -h
Usage of ./http2grpc:
-addr string
listen address (default ":8080")
-endponit string
the grpc server address(endpoint) (default "localhost:50051")
-gen string
testcase path, new testcase with null value
-import string
import path of proto, split with ',' (default "./protos")
-pre string
the prefix of url path (default "/ov/")
-proto string
proto path (default "./protos")
如何使用
先启动一个grpc服务,如上面的dynamic_grpc_server,可以直接在cmd/dynamic_grpc_server文件夹下执行go run main.go
使用相同的proto文件运行http2grpc,可以在cmd/http2grpc文件夹下执行go run main.go