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