How Artificial Intelligence is changing Test Automation? Micro Focus is leading the way…
When you (re-)search “artificial intelligence impacting test automation”, you will find alot of unclear or future looking statements, how Artificial Intelligence (AI) will impact test automation. On the other hand, alot of new tools will be appointed as AI testing tools, which have never been or seen before in test automation. This article will give you different practical examples, how AI is changing test automation and Micro Focus is leading the way… and for sure, AI is much more than only the examples of this article…
When we think about AI, we often thing about it as a feature or a tool, which removes all the obstacles we face in testing, all the overload and manual intervention or even effort on maintenance or analysis. Obviously finding solutions to our problems through machine learning and AI to make our lives easier is our long term goal.
Most of the challenges are huge pain for organization and causes attention. But taking a closer look at those, majority of the test automation challenges are execution or even post activities. Lets take a few steps back and face AI in the current state and see how it already benefits the testing process. Even in areas we don’t have the highest focus on attention. Lets see AI more as a capability, which supports us during the whole continuous testing process, espacially when we look into test automation.
What is AI in context of test automation?
To understand AI in context of test automation, we have to understand how AI is defined in general.
According to Wikipedia, AI:
- represents the intelligence of machines in contrast to the natural intelligence by humans.
- also appointed as “intelligent agents”
- describe machines that mimic “cognitive” functions
Lets unpack the definition for a moment.
Representative intelligence similar to ours (of humans) – natural intelligence is shaped by its lifecycle through out the age of each individual. How is the natural intelligence shaped? The shaping is part of the learning process of human brains, either by experience or by another individual (parents, friends, teachers,), etc.. Similarily AI is shaped majorily through individuals (company, open source, etc.) and experience based on pattern of its neural network.
Mimic cognitive functions – mimic appoints here in imitating actions of someone while as cognitive functions makes it more valuable for humans. In other words, providing value by acting similar to humans.
Intelligent agents – this is the most important one for us in context for test automation; AI as acting agents. Definition of an agent is “acting on behalf of another person”.
We can see AI as a supportive capability which provides value by acting.
Apply AI on your test automation process
Lets take a look on the test automation process from a high-level perspective. We assume to have 5 major phases during the process.
Identify – at this stage, the testing team decides to automated test cases for (any) selected application(s). Typically the selected application is running in production.
Build – during this phase, the test automation engineer or representative scans the application to build a fundament for test automation either as framework, reusable models or scripts. At this stage the application need to be atleast available on a testing instance as this is very important for the test automation engineer to understand how the technical identification of the application objects is set up. This is a time consuming and crucial phase for the test automation process.
Design – this phase now brings the reusable models or scripts together using the framework. At some organization Build & Design are performed at the same time.
Execute – at this stage, the automated tests are ready to execute. The execution takes place typically on multiple automation hosts reserved to run automated tests. On these machines the automation framework and run time need to be configured. Testing hosts costs alot when idling, therefor many organizations work with spin up and spin down of testing hosts when they need it. And this is also very time consuming in concern of designing and maitaining the spin up & down approach. For cross platform, browsers and / or devices, the scalability becomes even more challenging.
Maintain – at this stage, the test automation engineer adopt and apply all kind of changes to the test automation framework and make sure test cases are stable. The test maintenance is one of the keys to successful test automation.
If we filter out the phases with the highest time and effort spent on, we will identify the BUILD and EXECUTE phases.
What is the reason for spending high effort and time during these phases?
Understand the time and effort spent on BUILD phase:
- UI test automation requires the application to be available during build phase as the technical identification of the test object is crucial for scanning and creating the framework.
- Test automation tools can not work with objects, which they technically can not identify.
- Only trained individuals can work with test automation tools and need to have a technical understanding on how to best build the test automation libraries or models.
Understand the time and effort spent on EXECUTE phase:
- Testing hosts can only understand the test cases to run, if at least a runtime is installed on the machine additionally to the application under test (AUT).
- Testing hosts are not easy to setup, especially open source test automation requires different libraries for different OS, AUT, browsers and devices.
- Spin up and spin down need to be defined and it takes time to get initiated and run.
Lets summarize our findings first before understanding how to best make use of AI. The build and execute phases are time consuming, because of technical limitation of test automation tools and capabilities. These limitation would not exist if a human would handle the build and execute phases. On the other hand, a human would not perform as good as a machine across hours for the same repetitive tasks.
Shift-left: AI based testing
What if we can build the test cases prior the application is available (at all)? This would allow us to speed up the process and shifting to the complete left starting test automation. Watch the following short video to understand how the BUILD phase use mockups for test automation, even far before it exist based on interactive or non-interactive mockups.
As mockups are very useful for developers, why it is not possible to leverage it for test automation? Having the AI capabilities, allow us to automated application under test (AUT) even before they have been developed. Similarily a human is able to see a mockup and identify what kind of objects are displayed on it. It is the same behaviour as a human would perform test execution using a test script and executing according to the test guidance. The human brain power will recognize the objects at run time.
Starting test automation by using mockups will accelerate the testing phase by reducing the time for manual test execution. AI can understand the context and recognize the objects on even an image (mockup). With this approach, tests can be automated without having the app even one single line of code ever written. While shifting the test automation design activities to left, will allow quality assurance teams to save time towards Go-Live. Tests are being automated using AI on mockups and can be fully utilized during the (manual) testing phase. This would reduce the time to production and allow testers to focus on more important tasks while AI is handling the automation.
Now lets examine the same for the EXECUTE phase. As majority of testing hosts are virtual machines (cloud or on-premise), it would be great if AI can leverage the testing host in the same manner as a human would do.
Today the test automation infrastructure requires a dedicated setup for test execution, which need to be maintained continuously in order to keep the latest versions of toolset and plugins work together and stable. Beside the test automation tools, the set of AUT(s) need to be installed and configured as well. Each testing hosts acts as an isolated hosts with all the components deployed to run the automated tests.
While as on each testing host a test automation tool instance or run time need to be configured next to all the AUTs, for AI based test execution, it is not necessary to install the testing tools or runtime AND the AUT on the same testing hosts. Web access based on browser will allow the AI engine to access the testing host with the AUT and run the test like a human. This will reduce the maintainence effort building the test automation infrastructure.
The beauty about this approach is that for Desktop AUTs via web based browser access to the testing host, AI can recognize the AUTs on a cross platform (Windows, Mac, Linux).
The testing hosts won’t act as isolated hosts anymore and will share the apps across testing hosts.
Why web based browser access for remote desktop connections?
The explaination is simple. Browser based access does not require an installation or plugin nor libraries and work cross platform. This way it is easier to access machine of different operation system using the AI capabilities. This can allow for instance running a UFT desktop GUI Test (which is only windows based) on a Mac or Linux UI for the same AUT (example Java App).
The following web based browser access could be tried out:
- Chrome RDP
- VMWare Horizon web access
- Skytap browser access
Run UFT AI tests on a desktop application
In the following short video, we will demonstrate how a possible use case could look like using the current capabilities of UFT AI (version 15.0.1) on desktop applications. We will use an UFT client machine to connect to a windows environment using skytap web access with Firefox. On that remote windows machine, there is no UFT installed. Using UFT AI we will run a short automated test on a Windows Presentation Forms (WPF) [FlightGUI.exe] to book a flight order.
Please note that this is not an officially support feature nor approach, it is part of the content delivered within and by the community forums within Micro Focus.
As we have seen, Micro Focus UFT One can leverage AI features to run desktop automation even on client machines which does not have UFT One or UFT run time installed at all. The test automation is running a test like a human would to using a supportive AI engine which creates value by its action.
This is just a start of many more investigation areas and a completely new direction of independent AI driven test automation approach, which is not tied to any technical locators or installations on cross environment.
Micro Focus UFT comes with an Artificial Intelligence (AI) integrated and allows SAP Fiori apps to be tested using AI. To learn more about it check out this guide.
- Accelerating SAP Fiori Application Testing using UFT AI features: https://community.microfocus.com/t5/Application-Delivery-Management/Accelerate-Testing-towards-SAP-Fiori-Transformation-using-UFT/ba-p/2801454
- Shift left testing using UFT Artificial Intellgence: https://community.microfocus.com/t5/Application-Delivery-Management/Shift-left-testing-using-UFT-Artificial-Intelligence/ba-p/2800412
Try it out yourself, download UFT One and its artificial Intelligence today: https://www.microfocus.com/en-us/products/uft-one/free-trial
Great post !
Very good derivation and explanation.
The absolute highlight: “Run UFT AI tests on a desktop application” without an UFT installation on the remote windows machine 🙂
Completely new territory for test automation.