0 Shares 2329 Views 1 Comments

LeanFT Tutorial #4: Application Model Overview

Sep 10, 2017
2329 Views 1
Application Model

In this post we are going to focus on Application Model in LeanFT. Refer our earlier posts on LeanFT

Getting Ready with LeanFT

Browser Extensions and Settings

Object Identification Center

Important update for everyone: HPE UFT and HPE LeanFT are now Micro Focus UFT and Micro Focus LeanFT. Micro focus completed merger with HPE software. Read more..

We are using IntelliJ IDEA for all the demonstrations for this tutorial series. If you are using any other IDE and facing any issues, let us know via comments, we will try our best to help.

What is Application Model?

Application Model is like Object Repository in UFT. It contains test object’s hierarchy, description and properties. Applications model enables you to maintain your test objects at a single location for use across entire suite.

How to Create Application Model?

Application Model can be created as a dedicated Application Model project or as a part of existing Project.

Create a New Application Model

Step 1: Open New Project Wizard from Menu Option – File> New Project

Select LeanFT Option on the left and Application Model Project on the right.

Click Next

Step 2: Select “Create as maven Project” if you are creating application model as Maven Project else Ignore and click “Next”

Step 3: Provide Project name, Location details and click “Finish”

Create Application Model in an existing project

In the project explorer pane, right-click the src folder

select New > LeanFT Application Model item, and provide a name for the item.

The item (.tsrx) is added under the src folder and a corresponding .java file is generated under the appmodels folder.

Application Model File Extension

When you create a new LeanFT application model, two files are created: A .tsrx file that can display the Application Model editor as a rich user interface or as an XML file, and a tsrx.cs file containing the code for the application model class.

Each application model is compiled into a class that can be instantiated in your test, enabling you to access the complete test object model of your application.

Adding Test Objects Manually

Step 1: Open application model and Click on the “create new test object” button.

Step 2: New object pane will be displayed

Step 3: Provide the object name, technology, type and description for the object.

Step 4: Once you select the technology and the type of the object, you will see the list of properties populated for the object.

select the properties you want to use and provide the values for the selected properties.Enable regular expressions, by clicking on the star next to the value textbox.

Step 5: Click on the save button on top, Test object will get added in Application model

If you want to see only the used properties, click on the “Used” button else select “All” to see all properties

That’s it, you have successfully added your test object to application model. Let’s see, if you done it correctly and used appropriate properties for objects to be identified. Just like in UFT and TestComplete, LeanFT also has “highlight object” feature. Select added test object and click on highlight button.

If LeanFT is able to identify the object, you will get a successful message as below

Add Test Objects using Object Identification Centre

Refer our earlier post on Object Identification Center (OIC)

At the bottom of the OIC, click the Add object   http://leanft-help.saas.hpe.com/en/14.00/HelpCenter/Content/Graphics/Spy-AMToolbar.png   pop-up button and select Add or Locate.

Add : In simple mode , All starred objects that do not yet exist in the listed application model are added. While in Edit mode, The object that is in focus is added, as well as any checked parent objects that do not yet exist in the application model.

Locate : If a test object in the listed application model matches the description the OIC is using, the application model opens and that object is selected in the model. If you checked an object and one or more parents, the OIC first looks for the parent objects, and then tries to locate the selected test object only within the specified parent objects.

OIC Add to App Model

Using Application Model in Test

In your LeanFT test, add an import line for your application model. Instantiate the application model class and start using objects.


Convert UFT Object Repository to LeanFT Application Models

LeanFT comes with a small utility program which helps to convert existing UFT repositories to application models. This is named as – OR2APPMODELCONVERTER and can be found at LeanFT installation folder

<LeanFT installation folder>\bin

If LeanFT is installed with UFT, you can find it at UFT installation folder

<UFT installation folder>\bin

The usage syntax is as follows:

OR2AppModelConverter ObjectRepositoryFile ApplicationModelFile LogFile LogLevel


Provide the full path to the repository. It can be:

  • A shared object repository file (*.tsr)
  • A local object repository file (*.bdb)
  • An exported object repository file (*.xml)

Note: If the repository you provide includes test objects from UFTadd-ins that do not have a parallel in LeanFT, those objects will be ignored during the conversion.


The full path of the application model (*.tsrx) file you want to create.


Optional. The full path of a log file containing details of the conversion.

Although this option is optional, it is recommended.

If the utility is unable to convert a test object or a specific identification property inside a test object description, that information is indicated in the log (if you use the LogFileoption). You can use this information to fix such issues manually in the LeanFT Application Model editor.


Optional.The minimal severity level to include in the report. Possible values: Info | Warning | Error.

For example, if you specify Warning, then Warnings and Errors will be written to the report, but general information data will be excluded.

You may be interested

UFT Patch Updates – UFT 14.03
Unified Functional Testing
1860 views1
Unified Functional Testing
1860 views1

UFT Patch Updates – UFT 14.03

Saket - Mar 11, 2018

Post the launch of UFT 14.0, there are three patch updates has been released including a number of features and enhancement. Recently Micro Focus unveiled third patch…

Setting up Web Service Automation Project
Katalon Studio
Katalon Studio

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

Setting up Mobile Automation Project in MacOS
Katalon Studio
1169 views1
Katalon Studio
1169 views1

Setting up Mobile Automation Project in MacOS

Saket - Oct 09, 2017

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators. This tutorial explains how…

One Comment

  1. Pingback: LeanFT Tutorial #3: Object Identification Center (OIC) - Automated-360

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Email Address
Secure and Spam free...