QTP Automation Testing Tutorial 1

  • Published on
    12-Apr-2017

  • View
    324

  • Download
    0

Embed Size (px)

Transcript

Slide 1

Copyright 2015 IT Professional Academy1Automation (QTP) Testing CourseWELCOME

1IT Professional Academy

Copyright 2015 IT Professional Academy2About IT Professional AcademyTeam of Highly Skilled Trainer with work Exp of 7+Y.

Expertise in areas like Software Testing, Big Data, Linux-Unix, SAP BI as well as Software Development.

Provides both Classroom and Online Classes.

Training centers across multiple cities.

Provides Job Assistance, Interview preparation, Mock Interviews, Resume Preparation.

2IT Professional Academy

Copyright 2015 IT Professional Academy3Salient Features:

3IT Professional Academy

Copyright 2015 IT Professional Academy4About Trainer:Exp: 7+ Y in Automation Testing

Technical Expertise:QTP, -UFT, Selenium, Excel Macro, Test Complete, PHP, HTML-CSS, PL-SQL

Batch Intro.

4IT Professional Academy

Copyright 2015 IT Professional Academy5Course AgendaFluent in VB Script: variables, if-else, loops, arrays, Ddics, Objects, Functions etcExcel Macro: Basics of Excel MacroQTP-Basics: handling different web controlsQTP-Advanced: Excel, Data Tables, Mouse hovers, DB connections, DOM, AOM, COMQTP-Framework Development: KW Driven, Data Driven, Hybrid, Function Driven and Action DrivenAfter end of the course, You will be comfortable in below things:

IT Professional Academy

5

Copyright 2015 IT Professional Academy6Demo AgendaIntroduction to Software Testing.Introduction to Automation TestingAutomation ToolsQTP Vs SeleniumIntroduction to VB scriptIntroduction to HTMLIntroduction to Objects and Methods.Introduction to QTPRecord and Play Back in QTP

Copyright 2015 IT Professional Academy7Day 1 Topics1) Automation General information i. Automation definition ii. Purpose of the Automation iii. Benefits of the automation iv. Which applications are suitable for automation v. Which test cases are right candidates for automation vi. Which are not right candidates for automation2) Automation Efforts Estimation i. POC preparation ii. CBA & ROI3) Automation Tool Types i. Test management Tools ii. Functional or Regression Tools iii. Performance Tool

Copyright 2015 IT Professional Academy8ExpectationsWhat are your Expectations with this course?

Copyright 2015 IT Professional Academy9Introduction To Software TestingPurpose of Software Testing: To get Quality Product with out exceeding the set Cost.Live Example: Bank Lost $10000k in a month due to a defect.

Methodologies in Testing: Water fall Vs Agile

Software testing Life Cycle.

Copyright 2015 IT Professional Academy10Software Testing: Water Fall Model

IT Professional Academy

10

Copyright 2015 IT Professional Academy11Agile: Focus on MVP

IT Professional Academy

11

Copyright 2015 IT Professional Academy12Testing Pyramid: Agile

IT Professional Academy

12

Copyright 2015 IT Professional Academy13Introduction To Automation TestingAutomation is the use of tools and strategies that reduce human involvement or interaction in repetitive or redundant tasks.

Copyright 2015 IT Professional Academy14Need for Automation Testing?It Involves automating a manual process of testing.

Ever shrinking schedule and minimal resources.

Budget constraints.

Save time for repetitive tasks performed during testing.

etc etc etc.

Copyright 2015 IT Professional Academy15Need for Automation Testing?Bottom Line:So that machine works while you sleep so as to save

TIME&MONEY.Budget is the Driving Factor for all automation efforts.

IT Professional Academy

15

Copyright 2015 IT Professional Academy16Need for Automation Testing?ROI Example:

ROI = Benefit/Cost

Simple Rule: If Number of Automation Tester is more than Number of Manual Tester then ROI is not Achieved.

IT Professional Academy

16

Copyright 2015 IT Professional Academy17Automation ROIROI= Benefit/Cost

If green line is not going down, ROI will never be achieved.

IT Professional Academy

17

Copyright 2015 IT Professional Academy18Before you Automate..Ask two questions:

1. Shall you Automate?Should get some value out of it.Automating Flow which will only be used once should not be automated. Having said that, automating a flow which will be used only once but is important and not possible manually; should be automated.

2. Can you Automate?Check Automation feasibility.Before committing, always check if flow or AUT is feasible to automate. Do not false commit.

IT Professional Academy

18

Copyright 2015 IT Professional Academy19

IT Professional Academy

19

Copyright 2015 IT Professional Academy20Advantages & Disadvantages of Automation TestingAdvantagesDisadvantagesSaves TimeHigh Investment in Tool and trainingCost ReductionTest CoverageReliable: Eliminating human errorHigh man power requirement for test preparations.ReusableBetter Quality Software

IT Professional Academy

20

Copyright 2015 IT Professional Academy21Criteria For Automation Test ToolScopeEase of IntegrationCompatibilityPerformanceTypes of testsMaintainabilityAffordability

IT Professional Academy

21

Copyright 2015 IT Professional Academy22QTP Vs Selenium-1

QTP: It is commercial tool and hence it requires a license is expensiveSelenium: Its an open source tool hence it does not require license and is freeQTP: It is used for testing client-server applications. It can test web- based as well as desktop applicationsSelenium: Using Selenium only web applications can be testedQTP: QTP tests can only be developed in QTP IDESelenium: Selenium has the option of using wide range of IDEs like Visual Studio, Eclipse, NetbeansQTP: HP UFT only supports VB scriptSelenium: Selenium supports JAVA, .NET, Ruby, Perl, PHP, and many other programming languages

IT Professional Academy

22

Copyright 2015 IT Professional Academy23QTP Vs Selenium-2

QTP: HP UFT comes with built in object repository. Object repository development and maintenance is quite easy in HP ALMSelenium: Selenium dose not have such built in object repository, but object can be managed by using UI element user extensionQTP: HP UFT integrates with test management tool like HP Quality CenterSelenium: There is no such tool that integrates with SeleniumQTP: All types of dialog box is supported by itSelenium: It supports dialog box partiallyQTP: It supports different environments like SAP, Oracle, .NET but user need to purchase add-on license for themSelenium: It supports addition of plug-ins to include features that are not provided by core Selenium

IT Professional Academy

23

Copyright 2015 IT Professional Academy24QTP Vs Selenium-3

QTP: Automation testing is expensive due to licensing costSelenium: Web automation testing with Selenium incurs less costQTP: HP QTP offers very good technical supportSelenium: It has no official support, since it is an open sourceQTP: HP QTP supports only VBScript . Hence Object Oriented Approach to Test Automation becomes challengingSelenium: Selenium supports mature Object Oriented Language like JavaQTP: HP QTP is more user friendly and scripts are developed quickly.Selenium: It is a low level tool with less functionality. Script requires more time to develop and maintainQTP: Backward compatibility is powerful. Latest version of HP ALM supports code that was developed 5 years backSelenium: With new Selenium release the API changes. So Test Scripts need to be updated

IT Professional Academy

24

Copyright 2015 IT Professional Academy25QTP Vs Selenium-4

In Short it is similar to Buying a Laptop

QTP: Laptop with Windows 10 and useful Applications installed. Every thing up and Running.

Selenium: Laptop Case + Hard Disk+ Ram+ Linux CD + useful Applications CD. But Every thing for Free.

IT Professional Academy

25

Copyright 2015 IT Professional Academy26Introduction to VB ScriptVBScript designed to run on multiple platforms that use the ActiveX Scripting Interface.VBA (VB for Applications)More sophisticated customization.Power user focus, natural upgrade, superb integrationVisual BasicBest tool for distributed client/Server solutions.Powerful, robust, scalable.

IT Professional Academy

26

Copyright 2015 IT Professional Academy27What is VBScript?A subset of visual basicThe VBScript Code is case Insensitive.Microsoft Visual Basic Scripting Edition brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service (IIS).

IT Professional Academy

27

Copyright 2015 IT Professional Academy28VB Script ExampleVB Script EditorCreate a .vbs FileCreate a simple Program for Addition and Display the result.Calculator Program for Add, Subtract, Multiply and Divide.Walk thorough the VB Script Code to Automate IE.

IT Professional Academy

28

Copyright 2015 IT Professional Academy29HTML Basics:Hyper Text MarkUp Language

It is the Implementation behind a Web page.

Do Inspect Element in Chrome to Check the HTML code of the Page.

You can alter the HTML Page by changing the text in the Chrome Editor.

HTML Tags and Attributes.

IT Professional Academy

29

Copyright 2015 IT Professional Academy30HTML BasicsTypes of Control:Text ElementsText BoxLinksTableRadio GroupSelect ListDrop downCheck BoxButtonsHoversTooltips

IT Professional Academy

30

Copyright 2015 IT Professional Academy31HTML Basics: Tag Implementation

My First Heading

My first paragraph.

My first Link. Visit our Site

My first Table Vinod Khanna 50 Amir Khan 94


My first List

  • Coffee
  • Tea
  • Milk


My first Input Box


My first Radio Group Male
Female


My first Check Box


I have a car
My first Button


HTML Link: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic_documenthttp://parabank.parasoft.com/parabank/index.htmIT Professional Academy

31

Copyright 2015 IT Professional Academy32Object and MethodsEvery thing is an Object.All Objects has properties and methods/functions.

I am an Object:Properties:1. Name: Akash2. Age: 34 3. DNA: ATCG4. Weight: 80KGAnd many more..Actions I can DoType(what to type)Dance(which dance)Sing(which song)And many more

IT Professional Academy

32

Copyright 2015 IT Professional Academy33Object and Methods:HierarchyAll Objects has Parent.

I am an Object:Properties:1. Name: Akash2. Age: 34 3. DNA: ATCG4. Weight: 80KGAnd many more..Actions I can DoType(what to type)Dance(which dance)Sing(which song)And many more

I am an Object:Properties:1. Name: Akash_Dad2. Age: 603. DNA: ATCG_14. Weight: 75KGAnd many more..Actions I can DoRead(what to type)

And many more

IT Professional Academy

33

Copyright 2015 IT Professional Academy34Object and Methods

I am an Object:Properties:1. id: gs_htifo2. class: gsfi3. background-color: transparent and many moreActions I can DoTypeClickand many more..

GoogleInput Box

IT Professional Academy

34

Copyright 2015 IT Professional Academy35Target-Command-Value-SyncAll interactions are the combination of :

1. Target2. Command3. Value4. Sync5. Verify

Analogy: Paint- This Wall- With Red Color- wait for it to Dry -Verify

IT Professional Academy

35

Copyright 2015 IT Professional Academy36QTP Demo Example:Example: Record ScriptDemo Site: http://parabank.parasoft.com/parabank/index.htm

Script1: ValidateLoginFunctionality

IT Professional Academy

36

Copyright 2015 IT Professional Academy37QTP DAY 1 Ends.Thank you.

IT Professional Academy

37

Recommended

View more >