Run actions before or after a test launch

I’ve been looking for a way to run a “program or script” in the moment “appium” runs the test.

For example:

  • Capture video
  • Report by mail
  • Send logs

I have not been successful. Can anyone guide me?
I have read about “Log to WebHook” parameter and “callback address”, not if these features serve to my goal.
Perhaps if “Appium” send some information to a custom server, I can develop a program to listen and execute the actions I need.

I really did not find information to make what I need.

Hope you can guide me.


PS: Sorry for my bad English