0

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?

1
  • 1
    The big question is, would the end result be exactly the same?
    – Bart
    Commented May 22, 2022 at 21:33

1 Answer 1

1

If your goal is to initialize the system with test data and not to test the REST functionality, then direct database access seems to be the easiest and best reproducible approach. You probably need to ensure that there are no "hidden variables" such as sequences which would make the system fail or perform differently in different test runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.