Learn LeanFT @ Software Test Automation Group Meetup Presenter: - - PowerPoint PPT Presentation

learn leanft
SMART_READER_LITE
LIVE PREVIEW

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,


slide-1
SLIDE 1

Learn LeanFT

Presenter: Kate Droukman au.linkedin.com/in/katedroukman 21 April 2016

@ Software Test Automation Group Meetup

slide-2
SLIDE 2

Agenda

2

slide-3
SLIDE 3

Agenda

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

slide-4
SLIDE 4

Quick Intro

4

slide-5
SLIDE 5

What is LeanFT?

5

  • 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

Integrated into standard IDEs Creating tests in Modern Programming Languages Rich AUT Technology Support Complementar y with UFT Natural Integration with Dev & QA ecosystems

slide-6
SLIDE 6

Supported Technologies

Web SAP Mobile .NET Java StdWin

  • Based on UFT technology support
  • Insight technology (Image-Based)
  • Extensibility (future)
slide-7
SLIDE 7

LeanFT & the Dev-QA Ecosystem

HP ALM

slide-8
SLIDE 8

LeanFT Main Core Features

SDK

  • A powerful code library used

to interact with the AUT

  • Provided in 3 flavors: .NET

(C#), Java, JavaScript *

  • Comprehensive, user-friendly

& fully-documented

Object Identification Center

  • One stop shop for any object

identification task

  • Object inspection,

customizing identifications & code generation accelerator

Application Models

  • A rich graphic tool (in the IDE)
  • Abstracting application objects
  • Separating the test logic from

the object identification

Provided by the LeanFT IDE plugin

Run Report

  • A rich html run report
  • Generated automatically
  • Enables easy root-cause

analysis

slide-9
SLIDE 9

LeanFT – IDE Plugins & SDK

9

slide-10
SLIDE 10

LeanFT – IDE Integration

10

  • 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
slide-11
SLIDE 11

LeanFT – IDE Plugin

11

  • 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
slide-12
SLIDE 12

LeanFT – SDK

12 Provided in 3 flavors:

A comprehensive, rich, user-friendly and fully documented automation code library

slide-13
SLIDE 13

LeanFT – SDK (2)

13

  • The SDK is fully typed, E.g.:

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

slide-14
SLIDE 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:

slide-15
SLIDE 15

Hands-On Demo

15

slide-16
SLIDE 16

LeanFT & BDD

16

slide-17
SLIDE 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(); }

slide-18
SLIDE 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

slide-19
SLIDE 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

slide-20
SLIDE 20

BDD & LeanFT

20

try{ ModifiableSDKConfiguration c

  • nfig = new ModifiableSDKConfiguration()

; 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

  • ) throws IOException, GeneralLeanFtException, Rep
  • rtException {

//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(); }

slide-21
SLIDE 21

Learn more about LeanFT

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

slide-22
SLIDE 22

Thank you

22