How to test views?

I’m working with the Java Kickstart method and related docs. Am I overlooking some documentation on testing views? I can’t seem to exercise them via the client in the ITs and, while I can create a view request in the UTs, I can’t figure out how to use that request to exercise the view and assert the result.

I don’t understand why that wouldn’t be possible using the client in a IT test. At the end, it’s just about calling a gRPC method, no?

Did you get an error when doing so?

Yes, testing a view with a gRPC client in an integration test will work the same as other services. The main thing to note is that the view may not yet be updated, so having some form of eventually or retries will probably be needed. And in your integration test you’ll need to create clients for both your entity service and the view service.

I don’t think we have an example of integration testing a view in the Java samples, something we should add. We do have a view tested in this integration test for the JavaScript version of the customer registry sample: