Enhancing Test Automation: Artificial Intelligence & Machine Learning

Artificial Intelligence

Artificial Intelligence and Machine Learning in testing have been fairly large buzz words around the testing community for the past few years. The potential for the number of different possibilities in which AI can be integrated into an existing testing pipeline is exciting and when a proper Artificial Intelligence test strategy is applied to a workflow, can help enhance a team’s overall automation process by improving test authoring, removing code barriers, and boosting test efficiency over time. With that out of the way, let’s talk about two of the most common AI types we can utilize for bringing AI into a testing infrastructure.

Convolutional Neural Network

Convolutional Neural Networks or “CNN” models are primarily used for image-based neural networks that utilize pattern matching in order to determine if an image matches a given label within the CNN model.

There are a few ways we can utilize a CNN model within a test infrastructure. The most common way is to use a CNN model to identify web elements on the page instead of requiring the test engineer to define every element individually. Defining web elements on the page is one of the most brittle components to test automation setup as the framework will ultimately rely on the stability of an attribute in order to make sure their test remains rock solid. Allowing the Artificial Intelligence to handle the web element definition component of the framework will lower overall maintenance of the page objects and may also raise the team’s confidence in the test results that were previously plagued with flaky tests due to poor web element definitions.

To achieve an AI-assisted web element definition, we can utilize the CNN model by passing it images of web elements on the page and then classify the image against the labels within the model. Once the model classifies the image as matching the label passed to it, the stored web element can then be selected, no web definition needed. There are a number of techniques that can be utilized to improve this process, you can use live labeling which allows you to label elements on the page at run time. Transfer Learning is where you take a model that already knows about web pages and train it so it knows your web page really well, and finally, there is simply collecting a dataset that contains all of the desired data that you will be passing to the model during the tests.

Natural Process Language

Natural Process Language models in regard to testing are primarily used for text generation. The obvious use case here would be to utilize an NPL model for test script generation. The benefits are fairly consequential when you no longer have a code barrier placed on the role of creating test scripts. PM’s, BA’s, Manual Testers all now have the power to create automated test scripts.

An example use cases would be to iterate through production logs and look for key actions or user flows that would intern be passed to the NPL model and then could be generated into a test script based on the team's desired language. Or you could simply provide a test scenario and have the NPL model return the test script that follows that test scenario. No code input needed from the tester.

Summary:

CNN and NPL models are both great examples of the breadth of Artificial Intelligence options that can be used to enhance your current test automation process. The AI space is moving at a rapid state and is becoming more and more user friendly as each week passes. Understanding your team's scope and what options are available to you is important to help shape your journey to integrating Artificial Intelligence into your current testing pipeline.

 

tapQA Michael Wagner

Michael Wagner

Michael Wagner is a Test Architect and Principal Consultant with tapQA. He has over 13 years of industry experience as a Software Tester, Engineer, Developer, and Architect; He is primarily focused on driving innovative test automation practices and strategies within a number of organizations ranging from software to hardware. He enjoys sharing his technical prowess with industry colleagues and has given several technical presentations on test automation strategies and best practices. His areas of expertise are software testing, artificial intelligence, test automation and open source technologies. development evolve along multiple paths of various methodologies but has found quality has remained essentially constant.

Have a QA question?

Our team would love to help!

Invalid Email