JasperFx / alba

Easy integration testing for ASP.NET Core applications
https://jasperfx.github.io/alba
Apache License 2.0
405 stars 39 forks source link

GRPC Support #83

Closed dbettin closed 3 years ago

dbettin commented 3 years ago

Is it possible to test ASP.Net Core GRPC services via Alba?

jeremydmiller commented 3 years ago

@dbettin Sorry for the delay. I can't think of any reason why that wouldn't work. There's nothing yet in Alba to help formulate requests or read responses for GRPC, but I take pull requests:)

jeremydmiller commented 3 years ago

@dbettin I did some research today. I don't think that Alba really buys you much here for strictly GRPC endpoints. If you have a service that exposes both GRPC & normal ReST services, then you can just use the TestServer instance that hangs off of Alba 3/4's SystemUnderTest or v5's AlbaHost to create GRPC channels not unlike this post: https://thecloudblog.net/post/integration-tests-for-grpc-services-in-asp.net-core/

Long story short, I don't think Alba would do anything useful for GRPC integration testing and at most, there's a little bit of documentation to show how you'd use Alba's test harness to create GRPC client services.

jeremydmiller commented 3 years ago

I'm closing this as I don't think there's anything actionable here.