Quest for the Holy Grail of Test Automation (AI Testing)
Preface
The advent of DevOps has played a significant role in the growth of test automation. While many automation tools look great on the surface - their promises ultimately fall short. Among the shortcomings are expensive proprietary products, lack of uniform testing against various software platforms, and a critical need for skilled engineers to maintain test suites. The latter of which defeats the entire purpose of automation. These drawbacks cause a dependency on many automation products and integrations to simply cover all the bases.
AI Deception
Perhaps more insidious than the rest of the drawbacks, many modern automation tools disingenuously boast "AI-driven" features. A commonly touted feature is "AI self-healing" which in layman's terms means the test will attempt to interact with similar, nearby or historical elements if a prior interaction failed and update the test if the new interaction succeeded. It is clear to the keen eye that there is no real "AI" usage in these products.
Big Flaws
A major issue with current automation tools is that they are either too simplistic or too complex. There is no balance. Either the tool cannot accomplish common tasks or it is too unwieldy at scale and becomes hard to maintain. These tools are designed with inherently flawed principles of white and gray box testing.
Simple vs. Advanced
A simplistic automation tool would be a recorder that captures a tester's session as a list of coordinates with reference images or element paths during each interaction. On the other hand, an advanced automation tool would be an overly-engineered proprietary automation editor with a spattering of built-in functionality.
Neither of these tools can accomplish the primary goal of test automation - testing a system as if a real human were using it and ensure it works as expected. In a perfect world, automation would interact with the system under test exactly as a human would - with uncertainty, variance, and no understanding of the underlying system.
This conclusion then posits the following question - how would an authentic "AI-driven" test automation tool be implemented? A good place to start would be to design a high-level architecture with the AI technology we have right now.
High-level Implementation
The proposed AI testing tool is a solution to the current offerings that fail to replace adequate manual UAT testing. This is not targeting code-level testing such as API or unit testing.
The following is a high-level implementation:
1. AI testing performed is purely black box
2. AI tests are defined in such a way that steps are inputs to Natural Language Processing (NLP)
3. AI testing can be initiated in many ways
4. AI testing does not rely on learning a specific system - rather it learns how to use technology as whole and applies its knowledge on a moment by moment basis
5. AI testing fills in the knowledge gaps by itself
6. AI testing is at least as fast as a human or faster
The common thread throughout the proposed high-level implementation for the AI testing tool is that it behaves only as a human can. It does not base decisions or actions on the underlying technology of the system under test, rather it makes decisions based on the UI/UX patterns it was trained for and applies the test steps in the context that it is actively present in.
Trying a Common Scenario
Let's take a common UAT testing scenario and apply it to our proposed AI testing tool. Suppose we want to test a shopping website. The exchange below is what the AI testing tool was told and how it applied its knowledge to perform the test:
The scenario above was only 5 steps written in natural language. As the AI testing tool was trained to understand these UI/UX concepts, it was able to piece together the directions it was given with the current context of what it was seeing. This made the test a breeze to execute and required no hand holding, coding, or internal information about the system. It executed the test almost exactly as a human would have, given the same steps.
Too Good To Be True?
So if all of this seems too good to be true, then why has no one created a tool like this yet? The answer is simple: we are now living in the crowning moment of available AI technology at the intersection of computer integration. However, AI technology and the way to implement it requires technologists like us to go out of our way to learn the foundations, concepts, and libraries. It also requires a unique set of skills to understand the needs of automated testing and how they apply to available AI technology. Not to mention it requires an entirely new tool to be designed and built from the ground up.
Technical Implementation
Okay, the high-level implementation is great and all, but what do the specifics look like? What technologies would you implement and why?
Here is a proposal on how to put this AI testing tool together by using technology that's available right now:
1. Start by defining your UI/UX training data folder structures
2. Aggregate images for your UI/UX training data
领英推荐
3. Train your AI models one by one
4. Create the foundations for your AI testing tool engine
5. Define your NLP training data folder structures
6. Aggregate text examples for your NLP training data
7. Train your NLP models one by one
8. Integrate your AI models to the AI testing tool engine
9. Improve your AI testing tool with Collaborative Filtering so that it can make contextual decisions
10. Perfect your engine with many models
11. Build a product ecosystem around your AI testing tool engine
Possible, But Difficult
As defined above, it is clearly possible to build an authentic AI testing tool with today's available technology. The most difficult part from the AI perspective would be aggregating and training enough models so that predictions can be made across all software platforms and all UI/UX patterns within those platforms. Additionally, it would be difficult to aggregate and train NLP models that are needed to correctly predict the test step's intentions from a contextual and actionable perspective. The next hardest part will be developing and fine tuning the AI testing tool engine so that all the models, computer vision, and OS interactions happen in human-like manner. Lastly, what is already a settled science is creating a SaaS product around your new tool and making it a nice experience for your clients to use.
AI Ethics
So if this proposed AI testing tool is so good, couldn't it be maliciously used against software products that the owners did not intend? Yes, that's why to avoid malicious users you can have a product model that makes it not viable for botting on a free-tier and have policies that ensure companies are authorized to use the AI testing tool on their own software and are background checked for authenticity. Additional internal tooling could be created to detect patterns of malicious use of the AI testing tool and a legal clause could be included to immediately terminate the contract of users who are deemed to be using it maliciously.
The Holy Grail
If you've made it this far, you're probably wondering what the benefit of all this effort would be. Market researchers evaluated the software testing market to be valued at ~$52 Billion USD in 2023. It is expected to grow to ~$70 Billion USD by 2030. Imagine how much existing and new software will need to be tested between now and 2030. Now imagine how much money enterprises are spending on test automation tools and skilled professionals. You could legitimately disrupt (buzzword, but this time it's for real) the entire industry by creating an AI testing tool like the one proposed in this article.
That's the benefit. Nearly every existing test automation tool would be rendered useless and significantly inefficient compared to your new AI testing tool that effortlessly turns natural language steps into reliable human-like automated testing. If the SaaS product is made with a high degree of usability and collaboration for enterprises, they will be paying hand over fist for seats on your servers. An AI testing tool of this caliber combined with SaaS would easily surge to billions in sales as every single company that produces software would want to test with your AI testing tool since it is so good. Think about that.
With the publishing of this article, the race is now officially started for the first adventurers to embark on the quest to obtain the holy grail of test automation.
Addendum
I wrote this article in July of 2023 and decided not to publish it because I wanted to get a head start on my own journey on the quest for the holy grail (selfish, I know). At this point, I have already spent a few years in test automation and DevOps so I had gained adept knowledge of the job, tooling, and product landscape.
I promptly began learning FastAI. It is a library and API written on top of PyTorch which, according to them, "simplifies training fast and accurate neural nets using modern best practices." Their Python library and courses are the culmination of 7+ years tireless and unpaid work to ensure AI does not become a mysterious powerful force equipped solely by the few, but rather something that is openly shared and thoroughly understood by the many.
I owe a personal thank you to the renowned Dr. Jeremy Howard, Dr. Rachel Thomas, and the community that they created around FastAI. I highly recommend their free AI courses - even if you just want to learn how AI really works under the hood. (P.S. The deep learning neural network example created entirely in Microsoft Excel absolutely blew my mind).
I completed the Practical Deep Learning course by watching the YouTube videos offline on my phone while hiking in the Rocky Mountains throughout the Autumn (it was amazing). However, it turns out that learning how AI works and starting to code on your own are two very different things (I should have been coding while following the courses instead of hiking - oops).
Eventually, I capitulated my efforts and decided that in the near future someone else would have obtained the holy grail. That day is today. In March of 2024. This new open source AI test automation tool is why I am now publishing my (once secret) idea from half a year ago.
A New Hand Touches The Holy Grail
Skyvern is at the frontier on its own journey to obtain the holy grail of test automation. According to their GitHub repository, which was just open sourced two weeks ago:
"Skyvern automates browser-based workflows using LLMs and computer vision. It provides a simple API endpoint to fully automate manual workflows, replacing brittle or unreliable automation solutions."
While Skyvern does not advertise itself as a test automation tool, I immediately recognized the value it had to disrupt the ~$52B software testing industry.
It appears that Skyvern is still very new, as on their repository they have only checked 2/12 of their proposed items in their feature roadmap. It will be interesting to see this tool develop and grow over time in capabilities. Even more interesting will be the competing tools that arise from this newly established era of authentic AI testing.
Go ahead and read their website and repository as they explain everything in great detail; like how the tasks, steps, and actions flow works - something I did not ideate myself in this article which would be an integral part to the AI testing tool engine. I will be trying this tool out for myself and may write a follow-up article on how it goes.
“The best way to predict the future is to invent it.” Alan Kay
Welcome to the new era of authentic AI test automation.
SDET // Securing seamless functionality for user satisfaction
1 年Very informative. Thank you for sharing
CPO & Founder @ QA.tech | Product Leader and Tech Innovator
1 年Very inspirational article! At QA.tech we are currently building what you mention using similar technologies as Skyvern but completed with test planning and test evaluation. Check it out!
Senior Managing Director
1 年Kalyn Coose Very interesting. Thank you for sharing