Micro Focus announced AI-powered enhancements to the intelligent testing capabilities of the UFT Family, a unified set of solutions designed to reduce the overall complexity of automating the functional testing processes. As businesses place increased emphasis on developing innovative applications that better support users, scaling testing efforts becomes an elusive goal. These new AI-based capabilities ensure application teams can meet growing demands in an effective, efficient and agile way by increasing test coverage and test asset resiliency, and reducing test creation time and maintenance efforts.
The increase in pace and frequency of software releases, the proliferation of operating environments, and the exponential growth in the number of test cases has demanded the use of AI to revolutionize software test automation and positively impact both the efficiency and effectiveness of functional testing.
The Micro Focus UFT Family of functional test automation solutions includes UFT One, UFT Developer, and UFT Mobile.In UFT 15.0, AI-based testing is supported for mobile testing only and In UFT 15.0.1, desktop web support is added as a technical preview.
UFT AI Features
Micro Focus AI-powered test automation in the UFT Family enables users to
Streamline automation – Instead of creating multiple scripts for every possible combination and transaction, users only need to compose a single script that will automatically run on multiple platforms and browsers. This reduces the overall time spent on creating and maintaining test assets.
Consistently improve with little effort – The UFT Family’s AI framework evolves and adapts based on a crowd-sourced feedback mechanism. Customers are invited to expand and refine the AI model’s training data by securely and privately contributing information about their unique user interface paradigms, to constantly improve accuracy of object recognition.
Shift testing everywhere – A combination of an AI Software Development Kit (SDK) and Natural Language Processing (NLP) allows technical and non-technical testers to easily write tests and reduces the time and effort of technical testers in the creation/maintenance of automation code.
Advantages of AI-based object identification
UFT AI Features enable your tests to interact with the application you are testing in the same way a person would. UFT uses AI to identify objects visually, based on a wide variety of images, context, and sometimes text.
1.More intuitive test scripts.
2. Tests are technology agnostic, identifying objects visually, regardless of the UI technology details used behind the scenes.
3. Tests are easier to maintain, as an object changing location, UI framework, or even shape, won’t break the test script as long as the object remains visually similar or its purpose remains clear.
Install and enable UFT AI Features
To use UFT’s AI features, you need to install Install UFT AI Codeless and enable them in the Options dialog box:
Before installing the AI features, make sure you have the following installed:
- Microsoft Visual C++ 2013 Redistributable
- Install node.js version 8.9.4. This is a prerequisite for UFT Developer. For downloads, see http://nodejs.org/en/download.
- Install UFT with the UFT Developer feature and a valid UFT license.The UFT Developer feature is disabled by default, so you must explicitly include it. If you have a UFT installation without UFT Developer, the UFT AI Codeless installation automatically invokes the UFT installation and adds it. For details, see UFT Installation.
- One of Windows features, depending on your Windows OS , Windows OS with Microsoft Media Feature Pack , Windows Server 2008 with Desktop Experience and Other Windows Server OS with Microsoft Media Foundation.
Download UFT AI Codeless
UFT AI Codeless is part of the UFT offering.
Access the UFT installation files here: https://www.microfocus.com/en-us/products/uft-one/download
Save your download to a location that will have 260 characters or less in the path, including filenames within the installation folder.
Run the UFT AI installation
To run the installation using the installation wizard:
- Unzip the UFT package you downloaded.
- Locate the setup file AI\setup.exe.
- Run the setup.exe file, and follow the on-screen instructions.
- When selecting the features to install, select the AI Engine and the AI Codeless Testing Tool features.
Enable the UFT AI features
- Open the Options dialog box to the AI pane of the GUI Testing tab (Tools > Options > GUI Testing > AI).
- Select the AI active option.
- Restart UFT.
Inspect your application for objects
- Open the AI Identification View window to inspect your application and detect all AI objects in it.To open the window, do one of the following:
- Click the AI Identification toolbar button.
- At the bottom of the Object Spy, click INSPECT. (Available when AI Auto Inspection in the Spy is toggled on).
- Click on a web application or on the remote access window displaying your mobile application.Note: You can skip this step if you began the inspection from the Object Spy and the top-level object in the spy is a Web browser or Mobile device. UFT automatically selects that browser or device for inspection.The AI Identification View displays an image of the application, highlighting all of the detected objects.
- You can decide whether to show Visual Element or Text, to see either the objects that UFT detected visually, or areas of text in the application.
AI Bases UFT Script
Set the AI context
Before you can run any AI-based steps in your test, you must set the context in which to use AI. Add a statement to your test similar to this one:
AIUtil.SetContext Device("MobileDevice") For Mobile application
AIUtil.SetContext Browser("WebBrowser") For Web application
- A mobile Device test object stored in your object repository.
- A web Browser test object stored in your object repository or described using descriptive programming.
Add test steps
1.Drag and Drop the identified Object or Text from the Object Spy or the AI Identification View window into your test.The step added for each object includes any information used to identify it uniquely, such as associated text or the objects relative location on the screen
2.Edit your test using the AIUtil object.Next, use the AIUtil object to identify the control by type, text, or a combination thereof, and to perform operations on the objects, such as Click, Type, or Search.For details, see AI-based Testing in the UFT Object Model Reference.
'Set the context for AI
AIUtil("input", "USER NAME").Type "admin"
AIUtil("input", "PASSWORD").Type "password123"
Run AI-based tests
After inspecting your application and creating test steps, run your AI-based test as you would run any other UFT test. You can run the same test on different operating systems and versions, as it is not based on implementation details.
AI-based Testing – Test Objects
The objects, methods, and properties described in this section can be used when testing objects using UFT’s Artificial-Intelligence (AI) capabilities.AI-based testing is supported in UFT only when the UFT AI Features are installed and AI is enabled in the UFT options
AIUtil – A utility object for AI-based testing.
AIObject -An internal object used to perform operations on an object recognized using AI.
AITextObject -An internal object used to perform operations on text identified by AI in the application.
Find below link to know about the supported control types in AI-Based Testing in UFT