We use analytics to count visits and form use. It is on unless you reject it. We show no ads on this site.

AQA Virtual Summit/MeetupsTest Automation Methodologies

Adam Sandman – Testing the Moz500 Top Websites – AI Can Help

Published 11 May 2022. Updated with a short answer, key takeaways and a FAQ; the talk text is unchanged. Published by Zapple.Tech, founded by the founders of CodeceptJS and Codeception, open-source testing frameworks.

Watch on YouTube
Short answer

In this talk, Adam Sandman, founder and CEO of Inflectra, explains why test automation is hard to maintain and unreliable, based on scanning all 500 sites in the Moz Top 500 ranking. He reports what made locators hard to use and what testers, developers and AI or machine learning tools can do.

Key takeaways
  • Why test automation is difficult to implement and maintain
  • Scanning the Moz Top 500 websites
  • Four locator problems: unreliable IDs, attribute variety, dynamic classes, hidden frames and duplicates
  • What testers, developers and tool vendors can do
  • Self-healing tests and intelligent object identification

Adam Sandman was a programmer from the age of 10 and now is the Founder and CEO at Inflectra Corporation, where he is interested in technology, business, and innovation. At the Test Automation Meetup in March, he talked about the challenges of test automation, testing the best websites in the MOZ 500, and how AI and big data tools can help.

Why Is Test Automation So Difficult and Unreliable?

Automation is difficult not only to implement but also to maintain. And it is unreliable in the sense that automated tests written today stop working the next day correctly. This gives the feeling that the investment in them will not pay off. These concerns are pretty valid. Therefore, it is so important to understand why this is so and what we can do about it.Web app testing can seem like a uniquely challenging area of ​​testing compared to mobile and desktop app testing. But it’s not all bad. Therefore, it was decided to focus on this type of testing. Moreover, to analyze not just web apps in a static state but to consider them over time. The Moz Top 500 ranking of the most popular apps globally was chosen as the object of analysis.

The Moz 500 Top Websites

If you are engaged in digital marketing, you probably know such concepts as page rank, Moz, domain, or page authority. These terms are used in search engine optimization to see how authoritative a website is. Moz helps you identify which sites have the most traffic and rank them based on that metric.As a rule, these are sites of successful companies with the best developers. Among them are Google, LinkedIn, Youtube, Microsoft, WordPress, and others. It was these leading companies that developed the frameworks that are actively used to create apps today.

Results of Testing The Moz 500 Top Websites

All 500 sites in this ranking were scanned using some automation tools. The idea was that if you can create reliable, stable tests for these sites, perhaps these methods will work for others.Issues found:

  • ID’s not guaranteed to be unique. Even in cases where identifiers are unique, they are often dynamic or semi. And then they are almost entirely useless.
  • Wide Variety of Attributes in Use. The most popular attributes used are class, href, style, and target.
  • Dynamic Classes & Closures. The popularity of classes can become a problem because they are used to style the page, and sometimes they are generated by frameworks and become a giant tree of divs and other elements with lots of random classes. Therefore, trying to use this attribute here is problematic.
  • Hidden Frames & Duplicate Elements. The problem is that when you try to click on any item in the menu, it can be duplicated: the old menu still exists, but the new one is right in front of it. It is not evident to the user which menu is relevant.

What Can We Do?

  1. Testers should ask developers to collaborate and listen to what testers consider helpful changes for test automation.
  2. Automation Tools should have analysis tools (Spy, query, and analyze multiple DOM trees simultaneously).
  3. Ideally, the developers and testers should be able to have a common toolset that assists in joint working.

It is not usually possible with packaged apps such as Microsoft Dynamics, SalesForce, etc.

What Can Vendors Do?

If talking about AI, we have not yet reached the point where the machine itself can say: “I am an accountant; I can do the invoice myself.” But what AI/ML can do is provide you with page browsing tools and better automation strategies for:

  • Detect dynamic IDs.
  • Analyze identification power of attributes.
  • Analyze classes.
  • Identify Anchors.
  • Use Machine Learning (branded as AI but not really):

– Scan the app, compare to previously seen patterns;– Determine the right way to identify each element;– The trend is to try to make self-healing locators.

Conclusions

A look at the Moz 500 shows us the scale of the problem. Modern AI/ML technologies can help, namely, self-healing tests and intelligent object identification.

Questions about this talk

Why is test automation difficult and unreliable?

Adam Sandman says automation is hard to implement and to maintain, and that tests written today can stop working correctly the next day, which makes teams feel the investment will not pay off. He scanned the Moz Top 500 sites to understand why.

What problems did the Moz 500 scan find?

Adam Sandman reports four issues: IDs that are not guaranteed to be unique or are dynamic, a wide variety of attributes in use, dynamic classes generated by frameworks, and hidden frames and duplicate elements, such as an old menu still sitting behind a new one.

Can AI help with test automation, according to this talk?

Adam Sandman says AI has not reached the point where a machine can do a person's job alone. He argues AI and machine learning can help by detecting dynamic IDs, analyzing the identification power of attributes and classes, and building self-healing locators, which he notes is machine learning branded as AI.

Request a QA audit quote

Tell us what you ship and what worries you.

What happens after you send this

  1. You send the form: your situation and what you need tested, then your name and work email.
  2. Within one business day, we reply with a suggested first step, its scope, timeline and a quote.
  • Fixed scope
  • You decide after each step
  • The tests live in your repository
  • An NDA signed before access

“They helped us to close the positions and consult our team how to proceed further. High-quality quick feedbacks with the deep checking of the required tasks, professional approach, great understanding of the company's technologies and product, detailed reports.”

Kristina Lavrentieva, Manager at keepgo.com, Israel
  • Rated 4.9 out of 5 on Clutch, from 7 client reviews
  • 42 completed test automation and infrastructure projects
  • Founded by the founders of CodeceptJS and Codeception, open-source testing frameworks

Request a QA audit quote

    What is closest to your situation?
    Optional. The product, the platforms, how often you release, what broke last.

    You decide after our reply whether to go ahead.

    Prefer to talk first? Book a call

    One-week QA audit · written report

    Request a QA audit quote