What are the communication channels from the app (device) to a test host

Hello!

I have an Appium test to run certain actions in an iOS app on a device. I need a close to real-time communication channel to report certain actions executed in the app from the device to the test host so test host can react and behave accordingly. For example, a user presses a button which executes business logic, this logic generated some metadata which I want to be able to read from the test host.

For now, I came up with the only channel - files. The app can write metadata to files and test host constantly read updates from it using session’s pullFile method. This approach has some complexity around monitoring logic and delays in delivering messages.

Are there any other communication channels from a device to a test host I miss?

iOS is pretty limited from this perspective. An effective approach would be to implement a backdoor communication web socket on the application’s side, but this will require additional coding and may compromise application’s security if not implemented properly

Thanks for the answer! I’ve just learned about the appium webhook capability:

Also send log output to this HTTP listener --webhook localhost:9876
http://appium.io/docs/en/writing-running-appium/server-args/

Is it something I can use to establish a communication channel from device to UI automation host? @mykola-mokhnach