Talk to the Experts Reuse UFT Object Repository
Talk to the Experts Reuse UFT Object Repository in Lean. FT Fabio Calvo April, 2016
Agenda How to reuse UFT Object Repository in Lean. FT Run Lean. FT tests from within Visual Studio Demo Q&A – Ask us anything!
The Panelists Thom Griffith Fabio Calvo Amir Banet Software EDU Portfolio Mgr Software Support Sr. Product Manager UFT
Lean. FT General Concepts Lean. FT • HP Lean Functional Testing (Lean. FT) is a powerful and lightweight functional testing solution built specifically for continuous testing and continuous integration. Lean. FT requires familiarity with the basics of programming C# in Visual Studio, Java in Eclipse, or Java. Script. • The Lean. FT SDK and testing project templates enable you to create tests to verify every part of your application using C# or Java and all the functionality provided by the Visual Studio or Eclipse IDE and your chosen unit testing framework. Application Model • An application model is an abstraction, or model, of the application under testing. Is the equivalent of the Object Repository in UFT. Object Identification Center • The Object Identification Center lets you spy on the objects in your application, experiment with different ways to identify those objects, generate code to use in your scripts, or add objects to your application model. 4
How to reuse UFT Object Repository in Lean. FT 5
Step 1: Convert UFT object repository OR 2 App. Model. Converter. exe command line utility • The utility is located in <Lean. FT installation folder>bin. Or <UFT installation folder>bin. • Syntax • OR 2 App. Model. Converter Object. Repository. File Application. Model. File Log. Level Parameters • • Object. Repository. File (*. tsr, *. bdb, *. xml) Application. Model. File (full path of the application model (*. tsrx) resulting file) Log. File ( Optional - full path of a log file containing details of the conversion) Log. Level (Optional - severity level to include in the Log. File. Possible values: Info | Warning | Error. Example command • OR 2 App. Model. Converter C: UFTNotepad_Repository. tsr C: Lean. FTNotepad. tsrx C: Lean. FTOR_Convert. log Warning 6
Step 2: Create Lean. FT Application Model Project 7
Step 3: Add the converted Application Model *. tsrx file 8
Step 4: Open the Application Model Editor to manage objects 9
Step 5: Use the application model objects in the test a) Compile your application model project b) Create a reference in your testing project using Lean. Ft. App. Model. Project 4; c) Define the parent application object IBrowser test. Browser = Browser. Factory. Launch(Browser. Type. Chrome); d) Instantiate the application model class hp. Site_App. Model hp. Site. App = new hp. Site_App. Model(test. Browser); e) Use test objects from the application model in your tests. For example: hp. Site. App. HPMain. Page. Twitter. Link. Click(); 10
Run Lean. FT test from within Visual Studio 11
Step 1: Prerequisites 1. Supported version of Visual Studio( 2012, 2013, 2015) 2. Nunit Framework 2. 6. 4 3. Nunit Test Adapter (Can use VS Nu. Get Package Manager to install) 12
Step 2: Compile and Run Compile the Lean. FT solution • The solution may contain both the Lean. FT test project and the Lean. FT application model project • Class libraries, *. dll files will be generated for each project • The test. dll can also run using the testing framework runner such NUnit runner (nunit. exe) Run the Test • Use Visual Studio Test Explorer to run the Lean. FT test (Test->Windows->Test Explorer) • To run the test using Nunit. exe, load the Lean. FT test dll in Nunit. exe GUI Review Results • From the Lean. FT main menu option select Lean. FT-> View Last Run Results • By default, the Lean. FT report is generated to a folder called Run. Results in the project output path. For example: binDebugRun. Resultsrunresults. html 13
Demo 14
Demo Convert UFT Object Repository to Application Model Create new Lean. FT Test and reference the Application Model Run the Lean. FT Test 15
Demo (Test Flow) Using GUI testing Open Web application (apidev. accuweather. com) and enter location such : Doral, Florida, United States Back to GUI test we navigate to the mobile link and get the current and weekend weather forecast The JSON response contains a mobile link we want to test in the browser This Web application will provide an API URI that returns a JSON response Using a UFT API test we send the API request to get the JSON response and parse it. 16
Open Forum Q&A
Frequently Asked Questions q Which programming languages and IDEs are supported? q Can I use my existing UFT license to run Lean. FT? q Can I use UFT assets in Lean. FT? q Can I manage and run my Lean. FT tests in ALM? q Can I create a test on one browser and then run it on another version or another browser? q Can I use the same application model across different testing projects and for different browsers, mobile devices, or SAP GUI sessions? q How do I specify which Lean. FT technology support (add-ins) to load? q Where are my Lean. FT product files stored if I install from UFT? q Can Lean. FT continue to run if the RDP connection is locked or disconnected? q How do I identify and handle errors that occur during a run? q Can I run multiple Lean. FT tests in parallel on the same computer? 18
Frequently Asked Questions q Can UFT test on hybrid mobile applications? q Does UFT supports Windows 10 and Edge Browser? q Is Role-based HTML objects using the Web Accessibility supported? q Are there any changes in the text recognition mechanism? q Is it easier to track license usage and monitoring with new license server Autopass? q Is IIS or other web server necessary for installing Autopass license server? q What’s UI Automation new feature in UFT? q Is it possible to perform Cross Browser Testing with Mobile browsers in UFT? 19
Learn More – UFT and Software Education on HPE. com: www. hpe. com/software/education www. hpe. com/solutions/ART Social Media All about Apps blog http: //bit. ly/1 pi 8 a. Ef https: //www. linkedin. com/groups/55772/profile View course listings online ADM: www. hpe. com/training/ADM UFT: www. hpe. com/training/UFT www. hpe. com/blog/education https: //twitter. com/HPE_Education UFT Practitioners Forum http: //bit. ly/1 VG 2 di. D Training Plan Guides www. hpe. com/training/guides Dev. Ops Education & Training Public Dev. Ops Classes ART for UFT Sample http: //bit. ly/1 q. Eias. D Training Inquiries hpse. sales. ams@hpe. com
Thank you We hope you join us again next time
- Slides: 21