learn leanft
play

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,


  1. Learn LeanFT @ Software Test Automation Group Meetup Presenter: Kate Droukman au.linkedin.com/in/katedroukman 21 April 2016

  2. Agenda 2

  3. Agenda Topic LeanFT Quick Intro LeanFT IDE Plugins & SDK Hands-On – JUnit/OIC, Application Model, Reporter LeanFT & BDD Q&A 3

  4. Quick Intro 4

  5. What is LeanFT?  A lightweight, yet powerful, Functional Test Automation solution  Built specifically for Continuous Integration and Continuous Testing  Targeted to technical automation engineers and dev-testers in Agile Teams Creating tests Natural Rich AUT Integrated into in Modern Complementar Integration Technology standard IDEs Programming y with UFT with Dev & QA Support Languages ecosystems 5

  6. Supported Technologies  Based on UFT technology support  Insight technology (Image-Based) SAP Web  Extensibility (future) Mobile StdWin Java .NET

  7. LeanFT & the Dev-QA Ecosystem HP ALM

  8. LeanFT Main Core Features SDK Object Identification Application Models Run Report Center  A powerful code library used  A rich graphic tool (in the IDE)  A rich html run report to interact with the AUT  One stop shop for any object  Abstracting application objects  Generated automatically  Provided in 3 flavors: .NET identification task (C#), Java, JavaScript *  Separating the test logic from  Enables easy root-cause  Object inspection, the object identification analysis  Comprehensive, user-friendly customizing identifications & & fully-documented code generation accelerator Provided by the LeanFT IDE plugin

  9. LeanFT – IDE Plugins & SDK 9

  10. LeanFT – IDE Integration  LeanFT integrates with:  Visual Studio (2012, 2013 & 2015)  Eclipse (Kepler, Luna, Mars)  More in the future (e.g.: IntelliJ)  The main LeanFT-IDE integration components:  LeanFT SDK  LeanFT IDE plugin  Existing IDE capabilities can be leveraged  E.g.: Code Completion / Debugging  Tests are authored using modern programming languages  C# / Java / JavaScript 10

  11. LeanFT – IDE Plugin  Main capabilities provided:  Project templates for common TDD frameworks:  NUnit and MSTest (for VS)  JUnit (for Eclipse, and in the future: for IntelliJ)  More in the future (e.g.: TestNG for Eclipse / IntelliJ)  Tools:  The Object Identification Center (“OIC”)  Application Models 11

  12. LeanFT – SDK A comprehensive, rich, user-friendly and fully documented automation code library Provided in 3 flavors: 12

  13. LeanFT – SDK (2)  The SDK is fully typed , E.g.: Technology Object Type Test Object Type Description Class Web .NET: HP.LFT.SDK.Web. I Link .NET: HP.LFT.SDK.Web.LinkDescription Java: com.hp.lft.sdk.web.Link Java: com.hp.lft.sdk.web.LinkDescription Mobile .NET: HP.LFT.SDK.Mobile. I Toggle .NET: HP.LFT.SDK.Mobile.ToggleDescription Java: com.hp.lft.sdk.mobile.Toggle Java: com.hp.lft.sdk.mobile.ToggleDescription Java .NET: HP.LFT.SDK.Java. I Calendar .NET: HP.LFT.SDK.Java.CalendarDescription Java: com.hp.lft.sdk.java.Calendar Java: com.hp.lft.sdk.java.CalendarDescription WPF .NET: HP.LFT.SDK.WPF. I Menu .NET: HP.LFT.SDK.WPF.MenuDescription Java: com.hp.lft.sdk.wpf.Menu Java: com.hp.lft.sdk.wpf.MenuDescription 13

  14. LeanFT – SDK (3)  Error Handling – LeanFT SDK Exceptions:  ReplayObjectNotFoundException - when the object cannot be located  ReplayObjectNotUniqueException - when there is more than one object matching the given description  Child Objects:  Getting a collection of child test objects which match a given description:

  15. Hands-On Demo 15

  16. LeanFT & BDD 16

  17. BDD & LeanFT 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(); }

  18. BDD & LeanFT – Implementation details Recommendation :  Create your projects based on the LeanFT template project  Adjust as needed to fit the BDD framework you are using 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

  19. BDD & LeanFT  All LeanFT capabilities and tools, such as OIC and application models, should still be used as in a regular LeanFT project  Recommendation: Install the IDE BDD framework plugin. This helps when editing feature files, running tests, and binding the steps to the implementation methods  Detailed information on how to use LeanFT and Cucumber in C# and Java can be found in the LeanFT help center: http://leanft-help.saas.hpe.com/en/latest/HelpCenter/Content/HowTo/Cucumber.htm

  20. BDD & LeanFT public void beforeFeatureScenario(Scenario scenari try { o) throws IOException, GeneralLeanFtException, Rep ModifiableSDKConfiguration c ortException { onfig = new ModifiableSDKConfiguration() //the following will start a new test node ; in the report config.setServerAddress( new Reporter.startTest(scenario.getName()); URI("ws://myServerAddress:5095")); SDK.init(config); //other before scenario code Reporter.init(); } //put your test code here. public void afterFeatureScenario(Scenario scenario //Generate the report and cl ) throws IOException, GeneralLeanFtException, Repo eanup the SDK usage. rtException { Reporter.generateReport(); // The following ends the test node in the SDK.cleanup(); report } Reporter.endTest(); catch (Exception e){ } } 20

  21. Learn more about LeanFT Tutorials & Exercises Try us! LeanFT in C# Tutorial by Harshit Kohli LeanFT Trial Page LeanFT hands-on Exercises More info LeanFT Help Center UFT & LeanFT LinkedIn Group All About the Apps Blog Movies LeanFT Application Models LeanFT Object Identification Center 21

  22. Thank you 22

Recommend


More recommend