{"id":42796,"date":"2023-05-02T06:57:17","date_gmt":"2023-05-02T10:57:17","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=42796"},"modified":"2023-06-08T15:11:45","modified_gmt":"2023-06-08T19:11:45","slug":"using-ai-in-software-testing-to-improve-automated-testing","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/using-ai-in-software-testing-to-improve-automated-testing\/","title":{"rendered":"Using AI in Software Testing to Improve Automated Testing"},"content":{"rendered":"
We\u2019ve cast artificial intelligence (AI) as the boogeyman countering the \u201ctechnology makes everything better\u201d trope in popular culture for decades, from HAL in \u201c2001, A Space Odyssey\u201d to Skynet in the Terminator movies to VIKKI in \u201cI, Robot.\u201d<\/p>\n
An uncertain future tends to unsettle, if not upset, most people. The scary dystopian future because of technology running amok, as presented in those movies and books, speaks to our fear of being replaced.<\/strong> AI-powered robots will take away everyone\u2019s job, from assembly line workers to call centers and now, apparently, to knowledge workers working in software.<\/p>\n Still, for much of my career, many people listed me as an anti-automation person. I find this interesting because I use various automation tools to assist me in my testing work, even if I don\u2019t use trending name-brand tools. The reason is simple \u2013 those tools often did not do what I needed to do without a lot of extra work.<\/p>\n I am wary of the new, buzz-word-laden solution people hail as the next great thing to improve the software world. Early automation tools that did record and playback, and nothing else, were similarly acclaimed. The industry also praised the next several test automation<\/a> tools that fixed or avoided the problems of earlier tools.<\/p>\n Before I go all-in on a revolutionary tool or approach, I want to see real, repeatable evidence that it works as described. I have seen too many people, teams and companies burned by trusting initial advertising.<\/strong><\/p>\n The cool, new, attention-grabbing thing is ChatGPT and AI <\/a>in software\u00a0testing. So, let\u2019s talk about it.<\/p>\n A combination of three factors power AI: large volumes of data, significant computing power and the underlying model determining how the AI learns. This model drives the learning algorithms and processes the data, generating results.<\/p>\n Software professionals use internet searches to debug code problems or resolve other technical problems. We might search for how to write a block of code more efficiently than we have. Or we might look for a better approach to a problem than we currently have.<\/p>\n Some might argue traditional search engines aren\u2019t AI. But they are among the more common forms of how we use AI daily.<\/strong> The more we search for something and the more often we search using similar keywords, our searches get more granular. They get more precise.<\/p>\n As we repeat or hone our searches, the algorithms driving the search tool will refine and update presented results based on the results we open or click from previous, similar queries. That behavior, returning results based on what users select from previous keyword search results, is the essence of AI.<\/p>\n With a generative tool such as ChatGPT, instead of keywords driving selections that return results based on a data source and training, we get a created or built response based on prompts and queries. It is possible to use ChatGPT to do things like:<\/strong><\/p>\n Of course, results from ChatGPT can be reasonably accurate or confidently incorrect. So, it can act as an authority on a topic based on what it absorbs, but if that information is incorrect, it will not recognize the error.<\/p>\n What does that tell us? We should never use a response from ChatGPT without proper subject matter experts weighing in on the relevance and accuracy of the results. The results of any machine learning tool will only be as useful as the data we feed it. Any tool can give valuable or worthless results based on how it learns, what data it consumes, and the requests people ask.<\/strong><\/p>\n Coding and technical answers may give you starting points to consider. As a large language model, ChatGPT can combine pieces from various sources into a very confident \u2013 but occasionally very wrong \u2013 response. It is risky to rely on such a guide without other sources to verify code or confirm the response.<\/p>\n Can AI help us with better testing and test automation? Of course. Used wisely, it can help with test case generation by analyzing code and evaluating possible scenarios. We can use AI to optimize test cases by identifying redundant or unnecessary tests and removing them from the test suite.<\/p>\n AI can also help with automated test execution<\/a> by creating scripts that simulate user behavior and interact with the system under test.<\/strong> This step helps reduce manual effort and increases the speed and accuracy of testing. It can then monitor and analyze test results to identify patterns and trends that help improve the test suite and look for potential problem areas that might arise with different data or conditions.<\/p>\n This means using AI in software testing can help us analyze the test results and identify the root cause of defects, thus helping developers fix the issues quickly.<\/p>\n It will help us make software itself better, in time, similar to AI functions like automatic braking functions in smart cars, operating autonomous vehicles or onboard avionics for aircraft.<\/p>\n However, many tools are available that incorporate AI into their current work.<\/p>\n Tools to assist testing using machine learning or AI may help us do better, more efficient testing that comes in various forms.<\/p>\n UiPath<\/a> originally built automation libraries. They expanded to a desktop tool-building test automation and expanded into robotic process automation (RPA), including an end-to-end RPA platform.<\/p>\n Their business automation platform offering combines process and task mining using pattern recognition to build out recommendations and suggestions based on user inputs. It also has natural language capability native to the tool.<\/p>\n Testim<\/a> began as a mobile testing tool provider using a \u201clow code\u201d model to test mobile applications. It records the user flows entered, and the more a user works with it, the more it recognizes repeated patterns and offers suggestions. It has a visual editor to use for test creation, focusing primarily on mobile apps, but you can use it reasonably well with web projects. Tricentis acquired Testim in 2022.<\/p>\n Started in 2021, askUI<\/a> claims to be able to automate everything from Web to native desktop apps. They assert the tool can build out workflows to simulate human actions. The tool also appears to find any visible element on the device screen without an objectid. And it can do cross-device automation, for example, exercising a 2FA integration.<\/p>\nAI and ChatGPT<\/h2>\n
\n
AI and Better Software Testing<\/h2>\n
AI Testing Tools<\/h2>\n
Here are some of them I\u2019m looking into to learn more about:<\/h3>\n
UiPath<\/h3>\n
Testim<\/h3>\n
askUI<\/h3>\n
Mabl<\/h3>\n