capitalone / grpc-cucumber-js

Apache License 2.0
7 stars 6 forks source link

How to test gRPC streams? #5

Open rsantosr opened 4 years ago

rsantosr commented 4 years ago

Hi @katscott , nice to meet you... The project is very interesting, I have a question... How to test gRPC server streams, client stream, bidirectional? For example: A chat (Server Stream), we need two execution in parallel or Asynchronous with a transmitter and a receiver. How do we do this with cucumber?

Thanks for your attention @katscott

katscott commented 4 years ago

Hi @rsantosr, Since streams continually use the created call object it would need to be maintained to continue writing/reading within a cucumber scenario. I've not worked with streams much personally, but I've started a basic example in a personal fork that you can peruse for a starting point: https://github.com/katscott/grpc-cucumber-js/tree/streams-test