RoboCon 2022 - 2.10 Robot Framework and QFTest for SWT/Swing app automation

Published: 21 October 2022
on channel: Robot Framework
629
4

While Robot Framework offers plenty of solutions to automate different kind of UIs, steering a complex Java SWT application can still be challenging. We would like to show how Robot Framework can be integrated with the commercial tool QF-Test, to combine reliable steering of Java SWT UIs with Robot Framework awesomeness.

When we were tasked with creating test automation for an (externally developed) Java SWT application we were pretty sure that we want to use Robot Framework. DB Schenker is a member of the Robot Framework Foundation, so this solution is becoming a standard in our company. Additionally, when compared to other test automation frameworks, it's easy to learn and integrate with external apps and tools.
But obviously, we needed to find a library or a tool which would steer our AUT. Several options were checked (even frameworks other than Robot Framework), but the results were not satisfying. There were problems including the creation and usage of locators, test execution time, steering or even launching our application in test. The AUT itself is quite tricky, there’s a huge number of nested components and a lot of them have no unique ID’s. Moreover, the application comes in 4 different languages, which impacts the locators.
We asked ourselves the question: Are there any commercial tool vendors out there with a mature Java SWT engine and a Robot Framework integration? After some research we got a hint that there's a tool called QF-Test, which might work with Robot Framework and supports testing of SWT applications. QF-Test is developed by QFS (Quality First Software) and it's an automated GUI testing tool. It supports the creation and execution of automated tests for all Java applications, Web UI applications, Windows/Linux UI applications and even PDF documents. When we first approached the company about the possibility to use QF-Test with Robot Framework, there was an idea how to do it - but no testable proof of concept. Our goal was to write our Tests and Keywords completely in Robot Framework - while using the QF-Test Engine only for low level actions like ‘Click’, ‘Fill Text’, ‘Get Text’ etc. In a short period of time, full integration was provided by QFS and we were able to test it and eventually implement it in our test project. After some fixes and updates, the integration is alive and well and our test automation project gets bigger and bigger every day.
Currently we prepare and debug our test cases using Robot Framework and PyCharm or VS Code. We steer the AUT with the use of QF-Test procedures which are invoked as ‘Keywords’ from Robot Framework. Those ‘procedures’ necessary for testing the AUT are provided in a special QF-Test Test Suite and correspond with keywords in the Robot Framework code. They can be low level actions (like clicking or filling/checking control) or complex sequences containing multiple steps. Recording such sequences is also supported by QF-Test. When executing the Robot Framework tests, a daemon connects to the running QF-Test instance, invokes the procedures and therefore steers the AUT. As QF-Test runs natively on Windows and Linux, we were able to create a Dockerimage combining QF-Test, Robot Framework, the Integration and our AUT to run such tests easily on a CI System.


Watch video RoboCon 2022 - 2.10 Robot Framework and QFTest for SWT/Swing app automation online without registration, duration hours minute second in high quality. This video was added by user Robot Framework 21 October 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 629 once and liked it 4 people.