keystone3-firmware
keystone3-firmware copied to clipboard
E2E tests
I have started to play a bit around with the simulator and have set it up in a docker container using vnc and a X framebuffer. ( as you can see from #1107 )
Since I had to click the same flow over and over again to come to the ui view i modified, I started to use cnee
to record my input and replay it.
So long story short I realized that I can record a ui flow and when done create a png from the resulting framebuffer. This could be leveraged as a simple E2E tool to create tests for the UI, I have seen such approaches in other projects.
The workflow would be a script that records a session and when finished dumps the recorded xinput and png into a test folder from where an other script can replay each test and compare the results.
I have not tested how good that could work. Do you think something like that could make sense ?
Of course there are some major caveats to that approach, if a button position on the first screen for example moves then all tests have to be recreated. So that could be a major pain since it is easy to break all tests.
This could be circumvented by starting the simulator and injecting state so it opens a specific view with a specific state. Is there any functionality in the simulator now that can do that ?