0
votes

I have micro services built based on Spring Cloud Stream. Testing team needs to create integration test for these services. What are best practices?

Based on the sample below, Sink/Source/Processor from different applications needs to be in classpath of the testing project. Is the expectation is to package each service and include it in testing project?

https://github.com/spring-cloud/spring-cloud-stream-samples/blob/master/testing-samples/testing-demo/src/test/java/org/springframework/cloud/stream/testing/processor/integration/ToUpperCaseProcessorIntTests.java

Thanks

1

1 Answers

1
votes

When it comes to "integration" testing of spring-cloud-stream the scope starts/stops within a single stream. What you are asking about is testing a flow where several streams are connected via remote queues/topics etc. That is out of scope of spring-cloud-stream testing.

However, there is another framework which is specifically designed to create, manage, monitor, control etc., as well as test these flows. I am talking about Spring Cloud Data Flow where with a simple set of commands and/or using GUI you can assemble your stream apps into a flow.