Interaction between multiple devices in messenger

For example, I have a messenger app. I want one device to send message, another to receive it. How can I achieve automation testing of this case with 2 real devices?

How I imagine it: I launch test for sending message on first appium server with the first device. And I launch test for receiving message on the second server with the second device.

Is it how it is done? Or are there more elaborate ways?

You are doing correct. Made same 4y ago. In my case this was banking app where 2 users interacted between each other.

Same story:

  • 2 appium servers with unique ports
  • 2 drivers where each opens against appropriate appium server