Learn LeanFT
Presenter: Kate Droukman au.linkedin.com/in/katedroukman 21 April 2016
Learn LeanFT @ Software Test Automation Group Meetup Presenter: - - PowerPoint PPT Presentation
Learn LeanFT @ Software Test Automation Group Meetup Presenter: Kate Droukman au.linkedin.com/in/katedroukman 21 April 2016 Agenda 2 Agenda Topic LeanFT Quick Intro LeanFT IDE Plugins & SDK Hands-On JUnit/OIC, Application Model,
Presenter: Kate Droukman au.linkedin.com/in/katedroukman 21 April 2016
2
3 Topic LeanFT Quick Intro LeanFT IDE Plugins & SDK Hands-On – JUnit/OIC, Application Model, Reporter LeanFT & BDD Q&A
4
5
Integrated into standard IDEs Creating tests in Modern Programming Languages Rich AUT Technology Support Complementar y with UFT Natural Integration with Dev & QA ecosystems
Web SAP Mobile .NET Java StdWin
HP ALM
SDK
to interact with the AUT
(C#), Java, JavaScript *
& fully-documented
Object Identification Center
identification task
customizing identifications & code generation accelerator
Application Models
the object identification
Provided by the LeanFT IDE plugin
Run Report
analysis
9
10
11
12 Provided in 3 flavors:
A comprehensive, rich, user-friendly and fully documented automation code library
13
Technology Object Type Test Object Type Description Class Web
.NET: HP.LFT.SDK.Web.ILink Java: com.hp.lft.sdk.web.Link .NET: HP.LFT.SDK.Web.LinkDescription Java: com.hp.lft.sdk.web.LinkDescription
Mobile
.NET: HP.LFT.SDK.Mobile.IToggle Java: com.hp.lft.sdk.mobile.Toggle .NET: HP.LFT.SDK.Mobile.ToggleDescription Java: com.hp.lft.sdk.mobile.ToggleDescription
Java
.NET: HP.LFT.SDK.Java.ICalendar Java: com.hp.lft.sdk.java.Calendar .NET: HP.LFT.SDK.Java.CalendarDescription Java: com.hp.lft.sdk.java.CalendarDescription
WPF
.NET: HP.LFT.SDK.WPF.IMenu Java: com.hp.lft.sdk.wpf.Menu .NET: HP.LFT.SDK.WPF.MenuDescription Java: com.hp.lft.sdk.wpf.MenuDescription
cannot be located
than one object matching the given description
description:
15
16
Q: Which BDD frameworks are supported by LeanFT? A: All of them!
[When(@"John wants to buy (.*) tickets from '(.*)' to '(.*)'")] public void WhenJohnWantsToBuyTicketsFromTo(int numberOfTickets, string from, string to) { // Setting source location browser.Describe<IListBox>(new ListBoxDescription { TagName = @"SELECT", Name = @"fromPort"}).Select(from); // Setting destination location browser.Describe<IListBox>(new ListBoxDescription {TagName = @"SELECT", Name = @"toPort"}).Select(to); // Setting the number of tickets browser.Describe<IListBox>(new ListBoxDescription { TagName = @"SELECT", Name = @"passCount“ }).Select(numberOfTickets.ToString()); // Clicking to continue the flight reservation browser.Describe<IImage>(new ImageDescription { Name = "findFlights", Type = HP.LFT.SDK.Web.ImageType.Button, TagName = @"INPUT“ }).Click(); }
Recommendation:
If you do not use the template, do the following: 1. Reference the LeanFT SDK 2. Make sure LeanFT is initialized before executing the scenarios. You can do this by using the BeforeScenario method 3. Implement all methods using LeanFT automation 4. Make sure the LeanFT Report is generated at the end of the run For more details, see the LeanFT Help Center: http://leanft-help.saas.hpe.com/en/latest/HelpCenter/Content/HowTo/CustomFrameworks.htm
a regular LeanFT project
This helps when editing feature files, running tests, and binding the steps to the implementation methods
LeanFT help center: http://leanft-help.saas.hpe.com/en/latest/HelpCenter/Content/HowTo/Cucumber.htm
20
try{ ModifiableSDKConfiguration c
; config.setServerAddress(new URI("ws://myServerAddress:5095")); SDK.init(config); Reporter.init(); //put your test code here. //Generate the report and cl eanup the SDK usage. Reporter.generateReport(); SDK.cleanup(); } catch(Exception e){ } public void beforeFeatureScenario(Scenario scenari
//the following will start a new test node in the report Reporter.startTest(scenario.getName()); //other before scenario code } public void afterFeatureScenario(Scenario scenario ) throws IOException, GeneralLeanFtException, Repo rtException { // The following ends the test node in the report Reporter.endTest(); }
21
LeanFT Help Center UFT & LeanFT LinkedIn Group All About the Apps Blog More info LeanFT Trial Page Try us! LeanFT Application Models LeanFT Object Identification Center Movies Tutorials & Exercises LeanFT in C# Tutorial by Harshit Kohli LeanFT hands-on Exercises
22