I have a system landscape consisting of multiple applications.
- Each application provides REST interfaces to communicate with the outside world.
- Each application has its own data storage (some kind of database).
- Each application writes persistent messages for other applications to consume.
- Each application builds its read model of the others application's data by consuming these message streams.
I now need to populate the system landscape with test data. There would be two ways to do this:
- Create the test data via the REST interfaces (like it would be done in production too)
One disadvantage would be that for the test data to be consistent, I would need to wait for the response of each application so that I can then create dependent test data in the next application.
Another disadvantage would be that the other applications need to be able to handle a flood of messages that would be created when the test data is created. - Directly load the test data via SQL or another route into the read model of each application (bypassing the REST interface)
This would be faster and would not create a flood of messages.
Are there any major drawbacks to the second approach? Are there best practices for loading test data into a distributed application landscape?