A mobile app's evolution over time is a natural process, as its look and feel are regularly updated to keep users engaged. Buttons move, colors change, and text updates – but what about the target elements that were recorded initially? Legacy testing approaches would have you rewriting or re-recording tests whenever changes occur. However, modern mobile testing demands stability, with AI-powered machine learning locators dynamically accounting for changes without user intervention.

Introducing Machine Learning Locators

Testim's innovative approach leverages machine learning models trained on tens of thousands of examples to determine if target elements remain the same despite visual changes. Whether an element shifts or disappears from the screen, these locators ensure your tests remain stable and accurate, eliminating the need for manual editing or re-recording.

How Machine Learning Locators Work

The ML model is trained using a large dataset comprising thousands of examples. During training, it analyzes features of the original target element captured in the recording and compares them to features during test playback. These features include DOM locators like an element's ID, text, class, and more. The system adds pre-calculated contextual data points to provide additional context for the target element and its location on screen.

Comparative Analysis

The model uses anonymized comparative data – a set of aggregate numbers fed during training – to analyze each feature, highlighting similarities or differences between the original recording and playback. This ensures client privacy while creating a generalized model that can infer target element behavior across various scenarios.

Target Element Detection

The ML model analyzes the entire screen to locate target elements using thresholds. It measures if each element exceeds certain thresholds, enabling it not only to identify changes but also detect non-existent elements (e.g., accidentally deleted ones).

Machine Learning Model Robustness

Training enables the model to consider a vast number of data points across the entire screen, including generated calculated contextual data points in a weighted manner. The ML model develops a deep understanding of typical behaviors and assigns weights accordingly – for example, "list items" typically grow over time.

Optional Manual Fine-Tuning

Testim Mobile offers optional manual fine-tuning of thresholds through the UI:

  • High threshold: target elements found only when confidence scores are high
  • Medium threshold: target elements found with medium confidence scores
  • Low threshold: target elements found, even with low confidence scores

Each level has its pros and cons – a low threshold may yield false positives, while a high threshold might discount the target element. We wanted to give you this flexibility to customize your thresholds for specific needs.

Availability

Testim Mobile's Machine Learning Locators are available on paid plans, enabled by default. You can switch back to traditional "Fallback locators mode" if preferred. For more information, visit our help center at [https://help.testim.io/docs/editing-target-element-properties-copy](https://help.testim.io/docs/editing-target-element-properties-copy).

Experience the Power of ML Locators

Join us in exploring the transformative impact of AI-powered machine learning locators on mobile testing. Share your thoughts and experiences with us! 💬