I would like to improve the performance of my app by the use of macrobenchmarks. Since my app is based on TV devices, user jounrneys will largely include using keyevents on a remote control.
What I would like to know is how can I emulate keypresses (both tap and hold types) while writing a test inside profileblock? Something like press Dpad DOWN, hold Dpad UP, etc.