A Compiler for Multiplatform Behaviour-Driven Development
UI Testing

From MobileBDD scenarios to executable Maestro flows

Denis Schüle, BSc Master thesis

Agenda

01Motivation &
research questions
02Implementation
03Evaluation &
findings
04Contribution &
outlook

≈ €90 billion European app revenue

Annual estimate for 2025

Statista Market Insights (2026), converted to EUR using ECB 2025 average.

Android and iOS Duopoly

Smartphone sales in Germany, Apr–Jun 2025

73.1%

Android

26.3%

iOS

Kantar Worldpanel via Statista (2025)

Ensure the application behaviour

Shared understanding

Required for efficient application development.

The testing challenge

Check the intended behaviour through the UI.

Platform differences

Same intent different selectors and interaction steps.

How can a shared language help verify application behaviour across both platforms?

Final thesis · Introduction, pp. 1–2; §3.1.2, pp. 18–19

Key concepts

MobileBDD

Contribution of this work.
DSL for mobile UI scenarios.

AIM

Abstract Interaction Model
providing the context for MobileBDD

Maestro

Runs UI tests on Android and iOS.

S1–S4

Compiler pipeline stages.

ℰ

The set of MobileBDD scenarios used for evaluation.

Final thesis · §§3.1–3.3, 4.3

The three C research questions

RQ1

Compile

S1 + S2

What compilation success rate does the proposed compiler achieve, when transforming the MobileBDD scenarios in ℰ into syntactically valid Maestro flows?

RQ2

Check

S3 · Android and iOS

What expected terminal-status conformity rate do the generated Maestro flows for ℰ achieve on Android and iOS?

RQ3

Compare

S4 · Android and iOS

What differential raw-status consistency is observed between the generated flows for ℰ and corresponding manual comparator flows on Android and iOS?

Final thesis · RQ wording condensed from p. 2 · criteria: Table 4, p. 24

MobileBDD example

MobileBDD · excerpt from Listing 5
@SCN-F1-01-PScenario: Opening Getreidegasse displays its activity detailsGiven a visitor has opened the Salzburg activitiesWhen the visitor opens activity "Getreidegasse"Then activity details for "Getreidegasse" should be displayed

What the compiler checks

  • Scenario structure and ordered steps
  • Vocabulary, targets and capabilities
  • Arguments and screen relations

The AIM supplies context

to the context free grammar

Final thesis · §4.2 · Listing 5, p. 44 · line breaks adapted for display

Implemented pipeline

From shared intent to measured results AIM and MobileBDD feed the compiler's S0–S2 checks. Generated Maestro flows and manual reference flows run on Android and iOS. S3 and S4 assess terminal statuses. Compilation and assessment evidence feed per-run reports and offline study metrics. AIM Selectors + interaction recipes Compiler Validate setup S1 S2 Analyse MobileBDD Generate + validate Maestro YAML MobileBDD Behaviour + expected outcome Per-run reports Per-run reports → Offline study metrics Generated Maestro flows Validated YAML Execute Android + iOS Same setup per platform Manual reference flows S3 S4 Assess statuses Expected status Raw-status comparison

Final thesis · §§3.1–3.5, pp. 17–28 · §4.2 · §5.1, pp. 50–52

SUT - System under test

Android
Android activity overview with a search field, filters, map and attraction list
iOS
iOS activity overview with the same search field, filters, map and attraction list
  • SalzburgCard prototype
  • Kotlin Multiplatform shared logic
  • Compose Multiplatform shared UI

Final thesis · §3.1.2, pp. 18–19 · representative SUT screens

Evaluation setup and protocol

Protocol Purpose Composition
ℰ All reported RQ measures 32 variants
16 paths
8 interaction categories
10 runs Same ℰ in every repetition, per platform
RQ1: 320 shared compilation observations RQ2–RQ3: 320 × 2 OS × (1 manual + 1 generated) Total: 1,280 logical flow executions
Retry policy Interaction or infrastructure failure At most one retry
Recovery = flaky pass

SalzburgCard
SUT

Android + iOSOne emulator and one simulator; fixed configuration.

Final thesis · §§3.1–3.5, pp. 17–28 (retry policy: §3.5.2, p. 27) · Table 11, p. 51

Results

RQ1

Compilation

Shared compilation observations

320/320

100%

32 known variants × 10 repetitions

RQ2

Check

Final retained outcomes

318/320

Android · 99.375%

320/320

iOS · 100%

RQ3

Compare

Final retained outcomes

318/320

Android · 99.375%

320/320

iOS · 100%

8/10 complete run bundles passed.

Final thesis · §§5.1–5.5 · Tables 14–16, pp. 53–55

The evidence establishes bounded feasibility

BoundaryWhat it means

Known corpus · one app

Transfer to unseen scenarios and applications remains untested.

Same-author comparators

Shared interpretation can inflate status consistency.

One device per platform

Repetitions describe this setup; they cannot rank platforms.

Final thesis · §6.3, pp. 59–61; §7.2, p. 63

Contribution

Implemented transformation

MobileBDD
Restrictive BDD in .mbdd files, defined by ANTLR .g4 grammars
AIM
Application-specific targets, capabilities, selectors and interaction recipes.
Compiler
ANTLR parsing, typed Kotlin AST and semantic validation → Maestro YAML.
CLI
Orchestrates generation, validation, execution and report comparison.

Inspectable evidence

Generated flows run on Android and iOS.

Linked reports separate compilation, runtime conformity and status consistency.

Final thesis · §§4.1–4.2, pp. 28–37; §6.2, pp. 57–59; §7.1, p. 62

Further research

Stronger evidence

Independent validation Review assertions and traces

Failure reproduction Vary state, execution order and devices

Practical value

Transfer & reuse Other apps via AIM · another backend

Effort comparison Authoring and maintenance vs. direct Maestro

Final thesis · §7.3, pp. 63–65

Shared intent can compile.

Correctness needs richer evidence.

MobileBDD to MaestroAn implemented compiler workflow with separately measured compilation, runtime conformity and status consistency.