Verification Best Practices

In test automation, verifications are everything. Without them, some would argue a test isn’t even a test. This is especially true when testing with machine learning (ML).

Unlike traditional automation, Functionize doesn’t rely on static selectors. Instead, our ML-powered engine interprets the page dynamically, selecting the most likely element for an interaction (clicks, inputs, etc.). This flexibility drastically reduces maintenance, but it also changes how testers must think about automation.

Why Verifications Matter

Because selectors aren’t used, the Functionize platform will always interact with something—even if the page has changed significantly. If the intended element is missing, the engine will choose the next best option.

That’s a strength—but also a risk. If your test lacks proper verifications, false passes may occur. Worse, these false passes feed back into the ML engine, training it to choose the wrong elements in the future.

Verifications act as the communication channel between you and the ML engine. They tell the system: “This is what success looks like.” Without them, you risk building fragile, misleading tests. Verifications:

  • Validate expected outcomes,
  • Catch application issues early, and
  • Support dynamic testing.

Verifications are essential because they act as a feedback loop, guiding the platform to understand your goals and improving test stability. Think of the system as a teammate – clear communication through verifications is key to a successful partnership.

What Makes a Good Verification?

A good verification strategically confirms that the test is progressing correctly. Typically, these fall into three categories:

  1. Page Load: Add a verification step to confirm the expected page change.
    • Example: Navigating to the shopping basket page → Verify the basket page is displayed.
  2. Element Update: Add a verification step to confirm the expected page change.
    • Example: After login → Verify the username/profile appears in the header.
  3. Application Logic: Add a conditional check to confirm built-in validations work as expected.
    • Example: Entering an invalid postcode → Verify that the error message does not appear.

Best practice: Include verifications frequently—ideally every 10–15 steps—so failures are caught early. Quicker failures mean fewer wasted resources and faster debugging.

Best Practices for Using Verifications

  • Always add a verification after a page load—even if the URL doesn’t change.
  • Always use operators to handle variations when verifying dynamic elements on a page.
  • Verify when the state of a page changes after a user action.
  • End every test case with a verification step.
  • Use elements that are static and unique.
  • Verify elements generated after an action, not those already present.
  • Keep verifications granular—verify one element at a time rather than an entire container. This improves ML self-healing and makes diagnosis easier.
  • Avoid flaky elements (e.g., animations, ads, transient messages) that may cause false negatives.
  • Combine positive and negative verifications (e.g., confirm success messages appear, and error messages don’t).
  • Use conditional verifications when dealing with optional or dynamic content (e.g., different user roles, feature flags).
  • In Page Objects, add pre-state verification at the start and post-state verification at the end to ensure reliable, consistent flows.

Advanced Verifications in Architect

Functionize Architect gives you advanced tools for verification:

  • Custom Image Comparisons – Compare a page against a previous run or test step with configurable precision, even accounting for CSS changes.
  • Two-Factor Authentication Support –  Architect can handle flows involving SMS or other external verification steps.
  • Database Explorer –  Validate backend changes directly from within your tests.
  • Variable Storage –  Store values from one test and reuse them in another for more complex flows.
  • Attribute Editor & Custom JS –  Gain fine-grained control for specialized verifications.

Conclusion

Verifications are the backbone of ML-driven test automation. They:

  • Provide feedback to the Functionize engine.
  • Ensure your tests fail fast and accurately.
  • Make your automation more resilient as your application evolves.

Think of verifications as a conversation with your AI teammate. The clearer you are, the better Functionize learns—and the stronger your test suite becomes.