Leveraging Adaptive Timing

One of the biggest causes of flaky tests in legacy automation is timing — hard-coded waits, arbitrary delays, and inconsistent page loads. These static waits either make tests brittle (when the wait isn’t long enough) or inefficient (when the wait is longer than necessary).

Functionize eliminates this problem with Adaptive Timing. During execution, Functionize dynamically determines how long to wait for elements, based on:

  • The original test model (data captured when the test was created).
  • Historical execution data from previous runs.
  • Execution context from earlier steps in the same run.

This means your tests run as fast as the application allows while reducing false failures caused by timing issues.

Ways to Control Timing in Functionize

Functionize provides several methods to fine-tune timing behavior:

Timeout Settings

Timeouts define how long the execution engine should wait for an element before failing the step.

  • Controlled at Team, Project, or Test levels.
  • Setting: Missing Element Timeout (default: 15 seconds).
  • Use case: Global or project-wide standards where page responsiveness is consistent.

Smart Wait Actions

Smart Waits give granular, step-level control when additional precision is required. Instead of relying on static delays, Smart Waits analyze network traffic and page activity to dynamically pause until the application is ready.

  • Can be added via:
    • Architect during recording.
    • Quick Add on the Test Details page.
    • Slider View during test review.
  • Use case: Ensuring smooth transitions on dynamic pages, reducing test flakiness without slowing down execution.

Timing Model Overrides

The AI Timing Model can be tuned to be more aggressive or more conservative depending on your application’s needs.

  • Configurable at Project or Test levels.
  • Default value: 5.
    • More Aggressive (e.g., 3): Executes faster, waits less time. Useful for short-lived events like toast messages or quick notifications.
    • More Conservative (e.g., 7–8): Allows longer wait times for slower-loading pages or elements.

Example: If your application displays a toast confirmation (“Order #12345 created”) for only 1–2 seconds, lowering the Timing Model to 3 ensures Functionize captures and validates it before it disappears.

Summary

  • Adaptive Timing eliminates the need for brittle, hard-coded waits.
  • Use Timeout Settings for global defaults.
  • Add Smart Wait Actions for step-level control.
  • Adjust Timing Model Overrides for application-specific behaviors.

By combining these options, you can achieve fast, stable, and resilient tests that adapt to real-world conditions instead of relying on guesswork.