European XFEL (European X-Ray Free-Electron Laser Facility) is a multi-national non-profit research institute which provides unique research opportunities for scientists globally through the design, construction, operation and development of a linear accelerator based Free-Electron Laser source.
Boasting the world’s largest X-ray laser, European XFEL (EuXFEL) enables applied scientific research in diverse disciplines by supporting researchers to explore fundamental aspects of matter and energy — anything from the development of new medicines and therapies to novel solutions for energy storage to elucidating complex intra-planetary processes.
This type of breakthrough scientific exploration is possible thanks to the X-ray laser’s extremely high peak brilliance, high repetition rate (27,000 flashes per second) and extremely short pulse duration (less than 100 quadrillionth of a second), allowing for advancements in research areas previously inaccessible through conventional scientific methods.
Leading scientists from all over the world visit the European XFEL to perform their complex, cutting-edge experiments using state-of-the-art infrastructure and equipment. With a large number of these scientific users visiting for a short time, they are often faced with controlling a complex instrument for the first time. It is no surprise that, in such an environment and in order to support such high-impact research, the software tools behind the X-ray laser’s operation and management must be high-quality, well-tested solutions.
Enter the Squish GUI Tester, a tool used by EuXFEL’s software developers to test the graphical user interface of Karabo, the control and diagnostic software behind the facilities’ X-ray operation. We sat down with Anna Klimovskaia, Software Test Manager at EuXFEL, to discuss how she and others incorporate automated GUI testing with Squish into their software’s lifecycle and development processes.
“We don’t have the resources to test manually.”
The Karabo framework, an in-house developed system used for supervisory control and data acquisition (SCADA), serves as the software behind EuXFEL’s hardware operation. The Karabo GUI is built using a client/server architecture written in Python with both standard Qt- and custom-UI controls, and its primary function is to operate equipment in EuXFEL’s experimental hutches, including magnets and undulators, moving motors, initiating pumping, and other hardware operations in its long tunnels. Scientists visiting the institute schedule, typically, five-day experiments in the hutches, and interact with the Karabo GUI to accomplish their research. With time being the limiting constraint, it is vital that Karabo remains functional and defect-free.
“The GUI provides an intuitive human interface to complex hardware setups.”
To that end, Ms. Klimovskaia and her team employ Squish for automating GUI tests of the Karabo framework, in order to enable researchers to succeed. During the search for a GUI testing tool, the team looked for software that supported starting tests from the command line interface and where user-defined libraries are permitted. Cross-platform support was also important, given that Karabo is operated on a wide variety of Linux distributions, in addition to Windows. Squish came out on top.
“It’s really critical for us to execute GUI tests for all available platforms, always.”
When asked what her daily use of Squish is like, Ms. Klimovskaia reported the bulk of her time being spent in library development, with a smaller portion dedicated to actual test development. Her Squish tests are started and logged using the Robot Framework, from which Squish is instantiated, with the main idea being to develop Robot Framework keyword-driven scenarios which call reusable Squish library functions.
Ms. Klimovskaia implements a regression testing procedure by utilizing Squish’s property verifications: a snapshot of Karabo’s object properties is taken, the tests are run on different platforms, and differences, if any, are detected between runs. Using an in-house developed test result database, test data collected from nightly runs is stored, aggregated, treated, and made transparent to the development team.
“Beam time is extremely precious in terms of capital cost, but also to our scientific users…we cannot afford to lose time.”
During our interview, Ms. Klimovskaia made it clear to us that downtime of the Karabo framework due to bugs or crashes, during the experiments of EuXFEL’s scientific users, is crucial to avoid. “The data they get, they can use and reuse and analyze. It’s huge progress for them in their field.” The team has therefore invested heavily in GUI testing to ensure a smooth and stress-free experience for their users.
Looking to the future, Ms. Klimovskaia plans to grow the test suite’s GUI coverage, in tandem with the development team’s unit test framework, to cover more Karabo scenes. She also plans to execute tests on more platforms, as Karabo’s deployment on newer systems is actualized. Commenting on froglogic itself, Ms. Klimovskaia noted an excellent level of technical support from our engineers, remarking on our helpfulness in solving her team’s issues with their Squish implementation.
We at froglogic look forward to a continued partnership with EuXFEL and remain curious to learn about the new technological and scientific advancements that result from pioneering research taking place at the institute.