This occurred because, as a manual user I was actually pressing and holding down the RCU key to scroll through a carousel of content. The app proved to have a memory leak during this procedure. The RCU handles this by sending continuous key-signals to the device. the device then sends continuous key-down signals to the application running, which continually scrolls to the next cell in the carousel. Once the key-signals stop being sent to the device, either because the user lets go of the key or the RCU is no longer pointing directly at the device, then the platform sends a key-up signal to the application.
However, when the automated test scrolled through the same carousel, it is sending a single key-signal to the device every time the test calls key.press(). Between each key-press command in the test I am searching for a set of images before repeating. There is obviously too much time in between these signals for the device to consider the repeated key presses to be due to a user pressing and holding a button. This usage of the application avoids the memory leak so the automated test fails to expose the leak.
Is there a way to get a test to cover this behaviour in STBT?
If not, could I request it is added. I imagine something like key.press_down(key) and a key.stop_press_down(key) would help me complete this test.
many thanks,
Liam
Sorry for the delay. Happy new year. Back online now and will test this today.
I've tested this code and it has not have been able to reproduce the memory leak issue.
I've written a test client to expose the signals received. From this I can now see that the problem is that, when the RCU key is pressed and held down, the content application is receiving continual key-down signals, but will not receive a key-up signal until the button is released.
However, when the STBT test ran, it sent a key-up signal directly after every key-down signal.
Apologies - it is not actually the speed of the signals as suspected but is actually the order of the key-up signal with the key-down signal.