GUICop: Approach and Toolset for Specification-based GUI Testing
📝 Abstract
Oracles used for testing graphical user interface (GUI) programs are required to take into consideration complicating factors such as variations in screen resolution or color scheme when comparing observed GUI elements to expected GUI elements. Researchers proposed fuzzy comparison rules and computationally expensive image processing techniques to tame the comparison process since otherwise the naive matching comparison would be too constraining and consequently impractical. Alternatively, this paper proposes GUICop, a novel approach with a supporting toolset that takes (1) a GUI program and (2) user-defined GUI specifications characterizing the rendering behavior of the GUI elements, and checks whether the execution traces of the program satisfy the specifications. GUICop comprises the following: 1) a GUI Specification Language; 2) a Driver; 3) Instrumented GUI Libraries; 4) a Solver; and 5) a Code Weaver. The user defines the specifications of the subject GUI program using the GUI Specification Language. The Driver traverses the GUI structure of the program and generates events that drive its execution. The Instrumented GUI Libraries capture the GUI execution trace, i.e., information about the positions and visibility of the GUI elements. And the Solver, enabled by code injected by the Code Weaver, checks whether the traces satisfy the specifications. GUICop was successfully evaluated using four open source GUI applications that included eight defects, namely, Jajuk, Gason, JEdit, and TerpPaint.
💡 Analysis
Oracles used for testing graphical user interface (GUI) programs are required to take into consideration complicating factors such as variations in screen resolution or color scheme when comparing observed GUI elements to expected GUI elements. Researchers proposed fuzzy comparison rules and computationally expensive image processing techniques to tame the comparison process since otherwise the naive matching comparison would be too constraining and consequently impractical. Alternatively, this paper proposes GUICop, a novel approach with a supporting toolset that takes (1) a GUI program and (2) user-defined GUI specifications characterizing the rendering behavior of the GUI elements, and checks whether the execution traces of the program satisfy the specifications. GUICop comprises the following: 1) a GUI Specification Language; 2) a Driver; 3) Instrumented GUI Libraries; 4) a Solver; and 5) a Code Weaver. The user defines the specifications of the subject GUI program using the GUI Specification Language. The Driver traverses the GUI structure of the program and generates events that drive its execution. The Instrumented GUI Libraries capture the GUI execution trace, i.e., information about the positions and visibility of the GUI elements. And the Solver, enabled by code injected by the Code Weaver, checks whether the traces satisfy the specifications. GUICop was successfully evaluated using four open source GUI applications that included eight defects, namely, Jajuk, Gason, JEdit, and TerpPaint.
📄 Content
GUICop: Approach and Toolset for Specification-based GUI Testing Dalal Hammoud, Fadi A. Zaraket, and Wes Masri* American University of Beirut Electrical and Computer Engineering Department Beirut, Lebanon 1107 2020 e-mails: {dsh07, fz11, wm13*}@aub.edu.lb
Abstract
Oracles used for testing graphical user interface (GUI) programs are required to take
into consideration complicating factors such as variations in screen resolution or color
scheme when comparing observed GUI elements to expected GUI elements.
Researchers proposed fuzzy comparison rules and computationally expensive image
processing techniques to tame the comparison process since otherwise the naïve
matching comparison would be too constraining and consequently impractical.
Alternatively, this paper proposes GUICop, a novel approach with a supporting
toolset that takes (1) a GUI program and (2) user-defined GUI specifications
characterizing the rendering behavior of the GUI elements, and checks whether the
execution traces of the program satisfy the specifications.
GUICop comprises the following: 1) a GUI Specification Language; 2) a Driver; 3)
Instrumented GUI Libraries; 4) a Solver; and 5) a Code Weaver. The user defines the
specifications of the subject GUI program using the GUI Specification Language.
The Driver traverses the GUI structure of the program and generates events that drive
its execution. The Instrumented GUI Libraries capture the GUI execution trace, i.e.,
information about the positions and visibility of the GUI elements. And the Solver,
enabled by code injected by the Code Weaver, checks whether the traces satisfy the
specifications.
GUICop was successfully evaluated using four open source GUI applications that
included eight defects, namely, Jajuk, Gason, JEdit, and TerpPaint.
Keywords: GUI testing; Specification-based testing; Test Oracles; Software testing. 2
- Introduction
Testing of graphical user interface (GUI) programs entails several challenges that
have no counterpart when testing text-based command line programs. Most
importantly, practical oracles that accurately check whether the observed behavior in
GUI execution traces satisfies the expected behavior are hard to construct. In
particular, the rendering behavior of GUI components; i.e., their appearance and
relative positioning, depends on variant non-functional display parameters such as
screen resolution, color scheme, line style, thickness and transparency attributes. This
necessitates researchers to suggest the use of sophisticated comparison methods such
as computationally expensive image processing techniques [4][31][8] and fuzzy
comparison rules [23] in oracles. Otherwise absolute comparison would be too
constraining and consequently impractical. It should be noted that many researchers
opted to circumvent this issue by relying on the null-oracle, which considers a
program to have failed if it never terminates or terminates abnormally [7].
Other complications do exist. For example, GUI programs have several entry points enabled by an obscure system or library event loop whereas a text-based program has one entry point. Each GUI element accepts sequences of inputs of various types and from various devices as opposed to a fixed number of parameters with predefined types in text-based programs. Alternatively, this paper proposes GUICop, a novel approach with a supporting toolset that takes a GUI program and user-defined GUI specifications that characterize the rendering behavior of GUI elements, and checks whether the execution traces of the program satisfy the specifications. In other words, the specifications act as configurable test oracles. They aim at describing how GUI elements are meant to be displayed in terms of their layout, relative positioning, and visibility. The GUICop supporting toolset includes: 1) a GUI Specification Language; 2) a GUI test Driver; 3) Instrumented GUI Libraries; 4) a Solver; and 5) a Code Weaver. The user defines the specifications of the subject program using the GUI Specification Language whose atomic alphabet consists of basic geometric objects describing GUI components, and positional operators that express relative object positions. We also provide a library of commonly used GUI elements specified in the GUI Specification Language. These are used in a hierarchical manner to specify more complex GUI 3 elements and behaviors. Based on the user-defined specifications, the Code Weaver injects code at various locations in the subject program. The injected code starts and stops the instrumented output, and invokes the Solver. This enables the Solver to monitor the execution traces and check the specifications at appropriate locations and times. The GUI test Driver traverses the GUI structure of the program in order to generate events that drive its execution [12]. During the execution of the program: 1) the Instrumented GUI Libraries capture the GUI
This content is AI-processed based on ArXiv data.