How to quickly add AUT objects to LeanFT?
Question ID: 106408
1
0

In UFT we were able to use the Object Repository Manager to add lots of objects from our application very quickly. How do we do this with LeanFT?

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on September 17, 2015 4:13 pm
271 views
Answers (1)
1
Private answer

You can create an Application Model. An Application model consists of 2 files:

- .tsrx file, which can display the Application Model as a rich user interface or an .XML file.
- tsrx.cs file contains code for the Application Model class.

When compiled, the Application Model becomes a class that you can instantiate in the test. This is great because now you have access to the entire test object model of the AUT.

Unfortunately, this is **not yet supported in Eclipse**, but it's a great tool for Visual Studio users.

To create a new Application Model, you start by creating a new Application Model Project in VS. (File>New Project>Visual C#>Test>LeanFT Application Model Project). You can also add an Application Model in an existing project by right clicking the test project and selecting ''Add LeanFT>Application Model''

Now you have the Application Model Editor displayed. You can either add objects manually or use the Object Identification Center (OIC).

I prefer using the OIC. You'll see 2 new buttons on the OIC when launched from the Application Model Editor:

- ''Locate Object in Application Model'' - After spying on an object, use this to locate it in the Application Model, if it's been added.
- ''Add to Application Model'' - After spying on an object, use this to add it to the Application Model.
![alt text][1]

Once you have your Application Model built, you need to compile it or the project that contains it.
If you created the Application Model as it's own project, you have to reference it in the test projects you want to use it in by adding a ''Using'' statement:

using ApplicationModelProject;

You can then instantiate the Application Model class and use the test objects from the Application Model in your tests.

The LeanFT Help Center ([http://leanft-help.saas.hp.com/en/12.50/HelpCenter/Content/Resources/_TopNav/_TopNav_Home.htm][2]) has very detailed information at ''Learn the Basics> Use the IDE Plugin tools> Create and maintain Application Models''

[1]: /storage/temp/351-oic-appmodeleditor.png
[2]: http://leanft-help.saas.hp.com/en/12.50/HelpCenter/Content/Resources/_TopNav/_TopNav_Home.htm

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on September 17, 2015 4:15 pm
0
Very helpful information.
( at September 17, 2015 4:16 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top