(ci): look for information on automated GUI testing
Description
Sight still lacks test, especially GUI tests. To test GUI manually would be time-consuming, so we would benefit from automated GUI testing.
Proposal
I will look for automated GUI testing frameworks, check for what is possible and what isn't, and think about how to implement those tests.
Basically, we have two things to test: Qt GUI and OGRE rendering. The framework should at least be able to test the Qt GUI (be able to interact with interface (mouse clicks, key presses...) and check if the expected feedback happens (check if the interface changes, dialogs or error messages appear...). To test the rendering will probably be harder, for example, if we want to display a cube, how to verify automatically if the cube is displayed correctly? The framework should at least be able to take screenshots for further inspection, ideally the inspection should be automated too, else it won't be interesting.
Links / references
- https://www.softwaretestinghelp.com/best-gui-testing-tools/
- https://doc.qt.io/qt-5/qtest.html
- https://ldtp.freedesktop.org/ldtp-tutorial.pdf
- https://sikulix-2014.readthedocs.io/en/latest/toc.html
Documentation blurb
- QTest: in C++, only for GUI based on Qt. Can emulate key presses (QTest::key*) and mouse clicks (QTest::mouse*), can check if a message appeared (QTest::ignoreMessage), can check if a window appeared (QApplication::allWidgets) and can take a screenshot (QScreen::grabWindow).
- Linux Desktop Testing Project: in Python, only for accessibility-enabled GUI. Can emulate key presses (generatekeyeevent), and mouse clicks (generatemouseevent), can check if a window appeared (guiexist) and can take a screenshot (using ImageMagick). The last version was released in 2013, so it isn't maintained anymore.
- SikuliX: in Jython, supports all interfaces thanks to OpenCV. Can emulate key presses (Region.key*) and mouse clicks (Region.mouse*), can check if a window appeared (App) and can take a screenshot (Screen.capture).