Array
(
)

Stable and scalable frontend test automation

Thursday September 18, 2025
Markus Travaille, Rolf Bolt

How MTA 3.0 revolutionizes frontend testing for Mendix apps

Menditect is excited to announce the upcoming MTA 3.0 release, a significant advancement that extends our proven backend testing capabilities to include comprehensive frontend testing for Mendix applications. This series of blogs will explore the three most critical challenges in frontend test automation for Mendix apps—fragility, flakiness, and maintenance overhead—and demonstrate how MTA 3.0 provides specific, powerful solutions to each.

This introductory blog will define these core problems. Subsequent articles will delve into how MTA 3.0 eliminates fragile tests, prevents flaky test runs, and reduces the maintenance burden typically associated with complex frontend test scripts.

The three pillars of stable and scalable frontend test automation

Achieving stable and scalable automated frontend testing hinges on overcoming three primary issues: fragility, flakiness, and excessive test script maintenance.

fragile flaky excessive maintenance frontend testing

These problems are deeply interconnected and are often exacerbated when applying frontend tests to modern low-code frameworks like Mendix.

Fragility of a test

A frontend test tool’s fundamental requirement is to accurately locate the correct UI element before executing any action or assertion. A fragile test fails if its element locator is not robust enough, even when the Mendix application itself is functioning perfectly.

Fragility is frequently caused by an over-reliance on unstable UI locators, which are the unique identifiers used to find and interact with elements on a webpage.

  • CSS selectors and XPaths: These locators are often tied to the UI’s structural hierarchy and can be overly specific. For instance, a selector like div.container > form > field:nth-child(2) targets the N-th field within a form rather than a field by name. If a new element is added to the form or a class name changes, this locator breaks.
  • Lack of resilient identifiers: Relying on machine-generated or non-persistent IDs makes tests inherently fragile. A superior practice involves using a dedicated data-test-id attribute, which is a persistent identifier specifically for testing purposes and is unlikely to change. However, most Mendix widgets do not inherently provide data-test-id attributes, making this strategy ineffective for Mendix applications.

Flakiness of a test run

Flakiness in frontend test automation refers to a test run that produces inconsistent results—sometimes passing, sometimes failing—without any alterations to the Mendix application or the test code itself. These tests are unreliable and unpredictable, undermining developer trust in test results.

Flaky test runs often indicate underlying issues in the test environment or the test code’s inability to gracefully handle the dynamic nature of Mendix applications.

  • Timing issues: This is the most prevalent cause. Mendix apps are highly asynchronous, with elements loading at varying times due to API calls, animations, or dynamic rendering. A test might attempt to interact with an element (e.g., click a button or verify text) before it has fully rendered, leading to a failure. Even minor network latency can determine a passing or failing test.
  • Race conditions: When tests execute in parallel, they may contend for shared resources, leading to unpredictable outcomes. For example, two tests attempting to log in with the same user credentials could cause one to fail because the user session is already active.
  • Environmental instability: The test environment itself can introduce flakiness. A test that passes on a fast, local machine might fail in a continuous integration (CI) pipeline due to a slower network connection, a different operating system, or variations in available system resources. Running tests on local Mendix applications can also fail due to Mendix’s user session limitations in “trial mode.”

The interplay of fragility and flakiness

While often conflated, fragility and flakiness are distinct issues. A fragile test breaks due to a permanent, structural change in the Mendix model or widget (even minor ones), whereas a flaky test fails intermittently without any code changes. Flakiness is typically a consequence of timing issues or race conditions, not structural modifications. Nevertheless, both problems contribute to an unreliable test suite and increase maintenance overhead, eroding the trust developers and testers place in test results.

Maintenance overhead

The necessity for constant maintenance is a direct consequence of fragility and flakiness. The more brittle and unreliable a test suite becomes, the more time and effort is required to keep it functional.

  • Continuous updates: As development teams iterate on a frontend, they constantly make small changes to the UI, microflows, and domain model. Each of these changes, even minor, can cause fragile tests to fail, demanding manual debugging and test updates from developers or QA engineers.
  • Debugging time: When a test fails, the immediate question is: “Is this a genuine bug, or is it a flaky test?” This uncertainty forces teams to dedicate significant time investigating false negatives, a task that provides no value to the user and impedes the entire development and release process.
  • Long scripts: Frontend tests often require extensive data setup and cleanup of previous test results. This can lead to relatively long and complex test scripts, increasing maintenance. Similarly, asserting data stored in the database via the frontend requires multiple steps that inflate frontend test script size.
  • High cost: The cumulative effect of continuously fixing fragile and flaky tests results in a substantial maintenance overhead. The time invested in maintenance can quickly surpass the time saved by initial test automation, diminishing the return on investment of the test automation effort.
  • Cross browser compatibility: Building and maintaining a cross-browser testing tool is a major undertaking. It requires a dedicated infrastructure with real devices and browser versions, which is expensive and difficult to keep up to date. For a test tool to be successful, it must handle frequent browser updates and new device releases, ensuring its tests remain relevant and accurate.

Conclusion: the path forward with MTA 3.0

Setting up stable and scalable frontend test automation for Mendix applications is a formidable challenge. A robust solution must effectively address fragile and flaky tests while reducing maintenance overhead to an acceptable level. In the upcoming blogs, we will unveil precisely how MTA 3.0 conquers these problems. The next article in this series will explore in depth how MTA 3.0 enables you to prevent fragile frontend tests.

Dick van Gorkum

Contact the author

Enter your contact details

Menu