ViMoTest: A Tool to Specify ViewModel-Based GUI Test Scenarios using Projectional Editing
Mario Fuksa, Sandro Speth, Steffen Becker · 2025
Read ViMoTest: A Tool to Specify ViewModel-Based GUI Test Scenarios using Projectional Editing by Mario Fuksa, Sandro Speth, Steffen Becker (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16753.txt.
Introduction
Mario Fuksa, Sandro Speth, and Steffen Becker present a tool for writing interface tests against view models rather than screens, in a paper from 2025. End-to-end screen tests are costly to write, brittle, and tangled with framework details. Testing the presentation logic directly promises cleaner suites.
Their tool blends behavior-driven development with the ViewModel pattern and projectional editing of a small test language. Tests stay independent of any specific interface toolkit. A small JavaFX task manager example shows the workflow end to end. The tool generates executable test code from the specifications.
Catalog record
| CREATOR | Mario Fuksa, Sandro Speth, Steffen Becker |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 23 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-16753
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
ViMoTest: A Tool to Specify ViewModel-Based GUI Test Scenarios using Projectional Editing Mario Fuksa, Sandro Speth, Steffen Becker Abstract Automated GUI testing is crucial in ensuring that presentation logic behaves as expected. However, existing tools often apply end-to-end approaches and face challenges such as high specification efforts, maintenance difficulties, and flaky tests while coupling to GUI framework specifics. To address these challenges, we introduce the ViMoTest tool, which leverages Behavior-driven Development, the ViewModel architectural pattern, and projectional Domain-specific Languages (DSLs) to isolate and test presentation logic independently of GUI frameworks. We demonstrate the tool with a small JavaFX-based task manager example and generate executable code. I Introduction Graphical User Interfaces (GUIs) are essential in modern software systems by providing the surface for the primary interaction between users and the system. As GUIs often contain complexity, developing high-quality software systems faces the challenge of ensuring that GUIs are reliable and behave correctly. Automating testing brings the potential to validate GUI behavior, while current GUI testing approaches usually provide end-to-end testing. Those end-to-end approaches do not only verify the presentation logic but also the GUI framework specifics and often need a complex setup to bring the System Under Test (SUT) into the desired state. Existing GUI testing tools deal with challenges and limitations. These challenges include high coupling between test suites and the SUT, development and maintenance efforts, time behavior, or fragility of tests [ 1 , 2 , 3 ] . For example, most approaches directly interact with GUI widgets, which needs robust GUI widget identification to avoid high efforts when the GUI implementation evolves. To address those open challenges, we present a tool implementation of the ViMoTest approach [ 4 ] . ViMoTest focuses on efficient test specification with explicit test oracles while decoupling GUI test scenarios from GUI frameworks. The approach focuses on GUI application architectures with explicit testability design. Figure 1 illustrates the three combined techniques: Behavior-driven Development (BDD), ViewModels, and projectional Domain-specific Languages (DSLs). First, using the BDD technique, ViMoTest defines test scenarios , which test developers write in a structured manner using the given-when-then template. Second, those test scenarios rely on ViewModels 1 1 1 E.g., the ViewModel in the Model-View-ViewModel pattern acts as an intermediary between the View and the Model, exposing data and UI logic. , providing a testable abstraction of a GUI’s PresentationModel [ 5 ] . ViMoTest specifically targets HumbleView/PresentationViewModel [ 6 ] GUI architectures, where the ViewModel provides information in a format close to intended GUI widgets 2 2 2 E.g., a boolean for controlling the visibility feature of a widget. . This pattern supports focusing on the logical rather than the physical elements of the GUI, which reduces the coupling between tests and GUI implementations. Third, ViMoTest uses projectional structured-code DSLs with the language workbench JetBrains MPS ( https://www.jetbrains.com/mps/ ) to provide dedicated languages for describing logical widgets (e.g., buttons) with their supported features (e.g., visibility) and to specify test scenarios. The projectional editing 3 3 3 Projectional editing skips traditional parsing by directly working with the abstract syntax tree, enabling notational freedom and language composition. supports rendering logical widgets as intended by target GUI frameworks. For example, when asserting a button is disabled, the test editor renders a grayed-out button in the scenario’s then-part. At the same time, MPS’ editor supports features known from textual languages like auto-completion. Fig. 1: Three Combined Techniques of the ViMoTest Approach [ 4 ] . In an earlier research study, we validated the applicability of the ViMoTest concept by specifying test scenarios for five applications of the open-source domain using a preliminary prototype with limited generator support [ 7 ] . As a successor artifact, we have implemented a more mature implementation, including an improved editor and code generation support in Java and C++. Since we have not yet validated ViMoTest in real-world case studies, we demonstrate ViMoTest on a small JavaFX-based task manager project in this paper. The task manager example demonstrates how the generated test scenarios from ViMoTest integrate into the project implementation. II ViMoTest Concept ViMoTest addresses the goal of efficiently specifying robust test scenarios to test presentation logic. Figure 2 sketches the envisioned users: GUI developers and tester developers. GUI developers design ViewModel descriptions containing logical widgets with supported features and view commands. For example, using ViMoTest’s ViewModel Description DSL , the GUI developer describes a ViewModel with a checkbox widget, supporting a checked feature and a enabled feature, where a check command supports controlling the checked-feature of the checkbox. Based on those ViewModel descriptions, test developers specify test scenarios with the ViewModel Test Scenario DSL to provide context, trigger ViewModel commands, and assert that the logical widgets have a certain state. There might be further roles like domain experts, which can validate the test scenarios since they are specified in a language based on logical GUI widgets in a representation close to the target GUI. Fig. 2: Envisioned Users and the ViMoTest Workflow [ 7 ] . II-A Task Manager ViewModel Example We demonstrate the ViMoTest tool with a small task manager sample GUI, which consists of a table for listing tasks and two buttons for creating or deleting tasks. We use ViMoTest to model and generate the API of the ViewModel and implement its presentation logic manually in a JavaFX project [ 8 ] . Figure 3 shows the designed TaskListViewModel description in ViMoTest. In the widgets section, the three logical GUI widgets are defined: we define a Tasks table view widget, which consists of three columns Priority , Task Name , and Due Date , where the first column defines image cells and the other two define label cells. As depicted by the example, ViMoTest allows the insertion of example values for ViewModel descriptions. The table also supports a selected row feature. The ViewModel additionally includes two button widgets AddNewTask and DeleteTask , which each support an enabled feature to let the presentation logic control their sensitivity. For user interactions, we define four commands: a load view command explicitly loads the ViewModel with context. The select row command controls the selection of the table widget. Finally, two click commands control the logic if one of the two buttons is clicked. II-B Task Manager Test Scenarios Fig. 3: Task Manager ViewModel Example (ViewModel DSL). Fig. 4: Task Manager Test Scenario Example (Test Scenario DSL). Next, we specified test scenarios to test the three defined widgets of the SUT based on the TaskListViewModel definition. Figure 4 shows a sample test scenario: Fig. 5: ViMoTest Tool Architecture. The scenario has the description “Load Tasks and Add New” , specified manually by the test developer. The given part defines a data table with four columns with the unique name sampleTasks , where the first row specifies the header, and two further rows specify data values for two sample tasks. We reused the idea of data tables from BDD to specify simple string-based tables. The when part contains a LoadView and an AddNewTask click command action. The first command action explicitly triggers the ViewModel to fill widget features with the given context, while the second triggers the SUT to create a new task. Finally, the then part contains the assertion of