ViMoTest: A Tool to Specify ViewModel-Based GUI Test Scenarios using Projectional Editing
Mario Fuksa, Sandro Speth, Steffen Becker
TL;DR
The paper tackles brittleness and GUI-framework coupling in GUI testing by introducing ViMoTest, a tool that decouples presentation-logic testing from rendering details. It blends Behavior-driven Development, the ViewModel pattern, and projectional DSLs implemented in JetBrains MPS, enabling model-driven specification and automatic generation of executable tests in Java and C++. The key contributions are the ViewModel Description and ViewModel Test Scenario DSLs, plus an ALFI-based transformation chain that supports multi-language code generation, all aimed at more maintainable, framework-agnostic GUI testing. This approach promises improved test robustness and smoother integration into real-world development workflows, with an open-source release planned for practical adoption and validation in future case studies.
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.
