Table of Contents
Fetching ...

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.

ViMoTest: A Tool to Specify ViewModel-Based GUI Test Scenarios using Projectional Editing

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.

Paper Structure

This paper contains 14 sections, 6 figures.

Figures (6)

  • Figure 1: Three Combined Techniques of the ViMoTest Approach fuksa_vimotest_docsym.
  • Figure 2: Envisioned Users and the ViMoTest Workflow fuksa_vimotest_applicability.
  • Figure 3: Task Manager ViewModel Example (ViewModel DSL).
  • Figure 4: Task Manager Test Scenario Example (Test Scenario DSL).
  • Figure 5: ViMoTest Tool Architecture.
  • ...and 1 more figures