VIP - Leveraging HP Business Process Testing

48
Visionary Integration Professionals HP Business Process Testing Leveraging HP Business Process Testing to Utilize Multiple Data Sources for Data-Driven Tests

Transcript of VIP - Leveraging HP Business Process Testing

Page 1: VIP - Leveraging HP Business Process Testing

Visionary Integration Professionals

HP Business Process Testing

Leveraging HP Business Process Testing to Utilize Multiple Data Sources for Data-Driven Tests

Page 2: VIP - Leveraging HP Business Process Testing

2 of 48

Topics to be Covered

• Overview - Business Process Testing• Review Existing Database Driven Test

Suite• Business Case for Upgrading to

BPT/QTP• Building the New BPT/QTP Solution• Add BPT Data-Driving Component• Lessons Learned

Page 3: VIP - Leveraging HP Business Process Testing

3 of 48

Overview - Business Process Testing

Page 4: VIP - Leveraging HP Business Process Testing

Grocery Store Analogy for BPT

Entrance

Produce

Meats/Deli

Frozen Foods

Dairy

Bakery

Dry Goods

CheckOut

Exit

Grocery Store is made up of components:•Entrance•Check Out•Meats/Deli•Exit•Dry Goods•Dairy•Bakery•Produce•Frozen Foods

Some components must be processed in a specific order:•Entrance•Check Out•Exit 4 of 48

Page 5: VIP - Leveraging HP Business Process Testing

5 of 48

Business Process Testing Overview

• BPT is an Add-In Module for Quality Center • Reusable BPT Components

• Components • Can be Manual, WinRunner, QuickTest

Professional• Modular (Self Contained)

•Log in, Input Data, Log out• Input and/or Output Parameters• Drag-and-drop into BPT Test Cases

Page 6: VIP - Leveraging HP Business Process Testing

Grocery Store Components

Inputs for Dairy(What do we want from Dairy)

• Milk• Butter• Yogurt

• Flavor• Size

Outputs from Dairy(What did we get from Dairy)

• Cost• Out of Stock?

Dairy

Items & Activities are Specific to Each Component

Inputs Outputs

6 of 48

Page 7: VIP - Leveraging HP Business Process Testing

7 of 48

Business Process Testing Overview

BPT Components:• Input Parameters

• Data Consumed by Component• Provided by Quality Center Users• Output Parameters from Another Component

• Output Parameters• Derived in the Component Script • Pass Through (Set Output Parameter = Input

Parameter)

Inputs Outputs

Page 8: VIP - Leveraging HP Business Process Testing

Business Process Testing Overview

Input Paramete

rs

Output Paramete

rsBPT Compone

nt

8 of 48

Page 9: VIP - Leveraging HP Business Process Testing

Grocery Store “Template”

Produce

Entrance

Meats/Deli Frozen Foods Dairy

Bakery

Dry Goods

CheckOut

Exit

Store Components Assembled in a “Template” of the Store Layout

9 of 48

Page 10: VIP - Leveraging HP Business Process Testing

Determine Shopping Path

Exit

CheckOut

Meats/Deli Frozen Foods

Entrance

Dairy

Bakery

Dry Goods

Produce

Exit

CheckOut

Meats/Deli Frozen Foods

Entrance

Dairy

Bakery

Dry Goods

Produce

Shopping Path

1. Entrance

2. Produce

3. Meats & Deli

4. Frozen Foods

5. Dairy

6. Dry Goods

7. Bakery

8. Check Out

9. Exit

10 of 48

Page 11: VIP - Leveraging HP Business Process Testing

Reuse “Components”

Exit

CheckOut

Meats/Deli Frozen Foods

Entrance

Dairy

Bakery

Dry Goods

Produce

Different Shopping Path

1.Entrance

2.Produce

3.Dry Goods

4.Frozen Foods

5.Dairy

6.Dry Goods (Again)

7.Check Out

8.Exit

Exit

CheckOut

Meats/Deli Frozen Foods

Entrance

Dairy

Bakery

Dry Goods

Produce

11 of 48

Page 12: VIP - Leveraging HP Business Process Testing

12 of 48

Quality CenterBPT Tab Test Case Tab

Business Process Testing Overview

Login Input Data

Retrieve Report Logout

1. Login2. Input Data3. Logout

1. Login2. Retrieve Report3. Logout

Assemble BPT Components

into Test Cases

Add Test Cases to Test Sets

Build BPT Components

Page 13: VIP - Leveraging HP Business Process Testing

13 of 48

Case Study:Review Existing Database Driven

Test Suite

Page 14: VIP - Leveraging HP Business Process Testing

14 of 48

Previous Version of AUT

• HTML Based User Interface• 3 Pages• 1 End-Point for all Business Scenarios

Existing Application Under Test:

Page 1Decision Engine

Page 2 Page 3

Page 15: VIP - Leveraging HP Business Process Testing

15 of 48

Quality Center

WinRunner for Previous AUT

• 350 Tests to Support UAT• Manual Effort = 7 weeks• Automation w/ WinRunner = 8 hours• Test Data Stored in MS Access Database

WinRunnerAutomationFramework

Access

Driving Scripts

ApplicationUnder Test

Test Data & Expected Results for 350

Regression Tests

Page 16: VIP - Leveraging HP Business Process Testing

16 of 48

Business Case for Upgrading

to BPT/QTP

Page 17: VIP - Leveraging HP Business Process Testing

17 of 48

Business Case - Requirements

• Application Redesigned in ASP.NET• HTML Pages Changed to UI Tabs• 1 Business Flow Changed to 9 Flows

• Keep Existing Regression Tests • Quickly Test Flexible Logical Flows• Use Automation, but Non-Technical Testers• Ensure Ease of Test Suite Maintenance as

Application Evolves

Page 18: VIP - Leveraging HP Business Process Testing

18 of 48

AUT Redesigned

New Application Under Test :

•New ASP.NET User Interface•12 Tabs – Red Denotes Possible Business Scenario End-Points

Tab 6bDecision EngineTab 7b

Tab 8aTab 7aTab 6a

Tab 5b

Tab 5aTab 4Tab 3Tab 2

Tab 1b

Tab 1a

Page 19: VIP - Leveraging HP Business Process Testing

Business Case – Solution

• WinRunner is Not Compatible with ASP.NET. QTP Is!

• BPT is Modular like New AUT UI Architecture• BPT Can Leverage QTP Automation• BPT/QTP Can Be Integrated with Existing MS

Access Database• BPT Components Easy to Assemble into Test

Cases• BPT Components Simple to Maintain

19 of 48

Page 20: VIP - Leveraging HP Business Process Testing

20 of 48

Building the New BPT/QTP

Solution

Page 21: VIP - Leveraging HP Business Process Testing

21 of 48

New Solution Walk-Through

1. Create Components in Quality Center BPT Tab• Create Initialization Component• Create One Component for Each Tab• Create Verification Components

2. Create QTP Automation for New BPT Components

3. Drag and Drop Component(s) into Test Case Templates

Page 22: VIP - Leveraging HP Business Process Testing

22 of 48

Create BPT Components

Tab 6bDecision EngineTab 7b

Tab 8aTab 7aTab 6a

Tab 5b

Tab 5aTab 4Tab 3Tab 2

Tab 1b

Tab 1a

Created Init Component Added One BPT

Component per Tab Verified with 9

Additional BPT Components

Initialization Component:

Page 23: VIP - Leveraging HP Business Process Testing

23 of 48

Example New AUT BPT Component

7 Input Paramete

rs

0 Output Paramete

rs

BPT Componen

t

Page 24: VIP - Leveraging HP Business Process Testing

24 of 48

QTP Code for BPT Component

Page 25: VIP - Leveraging HP Business Process Testing

25 of 48

Create Test Case

Steps to Create BPT Test Case:1.Create New Test Case2.Select Test Type = Business Process3.Drag & Drop Components to “Assemble”

Test Case4.Link Parameters Between Components

Page 26: VIP - Leveraging HP Business Process Testing

26 of 48

Drag & Drop BPT Components

Click on Input Value

Page 27: VIP - Leveraging HP Business Process Testing

27 of 48

User Input Data

Page 28: VIP - Leveraging HP Business Process Testing

28 of 48

Repeat For Each BPT Component

Page 29: VIP - Leveraging HP Business Process Testing

29 of 48

Add BPT Data-Driving Component

Page 30: VIP - Leveraging HP Business Process Testing

30 of 48

Add BPT Data-Driving Component

Solution: Use Data-Driving Component• Leverage Existing Access Database • Leverage New BPT Components

ApplicationUnder TestTab 1

Decision Engine

Tab 2

Tab 3

BPT

BPT

BPTAccess

Data-Driver350 BPT Test Cases

Page 31: VIP - Leveraging HP Business Process Testing

31 of 48

Database Driven BPT Component

1. Create Open Data Base Connection (ODBC)

2. Create BPT Component3. Create QTP Script4. Add to “Template” Test Case5. Connect Data-Driver Output Parameters

to Other BPT Component Input Parameters

Page 32: VIP - Leveraging HP Business Process Testing

32 of 48

Create ODBC connectionSelect

Administrative Tools from Control

Panel

Select Data Sources (ODBC)

Page 33: VIP - Leveraging HP Business Process Testing

Create ODBC Connection

33 of 48

1. Click Add Button

2. Select MS Access

3. Type Data Source Name

4. Select Database

5. Click OK Note - New ODBC Created

6. Click OK to Close Dialog Box

Page 34: VIP - Leveraging HP Business Process Testing

34 of 48

Create BPT Component

1 Input:

Test Name

51 Outputs:

One to One

Correlation with MS

Access Database Columns

Page 35: VIP - Leveraging HP Business Process Testing

Create QTP Script – Get Data

Query Data from MS Access 35 of 48

Establish Connection to

MS Access

Build SQL Query,

Element by Element

Page 36: VIP - Leveraging HP Business Process Testing

36 of 48

Create QTP Script –Link Data

Link Query Response to

Output Parameters

Clean Up ODBC

Connection Objects

Page 37: VIP - Leveraging HP Business Process Testing

37 of 48

Update “Template” with Data-Driver

Page 38: VIP - Leveraging HP Business Process Testing

38 of 48

Select BPT Component to Modify

Click the Input

Parameters to Open

Dialog Box

Page 39: VIP - Leveraging HP Business Process Testing

39 of 48

Link Data-Driver Data to BPT Component

Select the “Output of previous component”

Checkbox

Page 40: VIP - Leveraging HP Business Process Testing

40 of 48

Link Data-Driver Data to BPT ComponentSelect the Correct Parameter

Page 41: VIP - Leveraging HP Business Process Testing

41 of 48

Connect Data-Driver to Modular Components

Repeat for All Applicable Parameters

Page 42: VIP - Leveraging HP Business Process Testing

42 of 48

Data-Driver Complete

• Done! Copy and Paste the “Template” as Many Times as Needed

• Change “Test Name” Input Parameter on the Data-Driver Component to Retrieve Different Test Case.

Page 43: VIP - Leveraging HP Business Process Testing

43 of 48

Lessons Learned

Page 44: VIP - Leveraging HP Business Process Testing

44 of 48

Two Implementations

• Regression Testing• 1 Test Case Template• 350 Test Cases from MS Access

• User Configured Tests• 9 Test Case Templates• 20 “Classic” BPT Test Cases• More Added With Each Release

Page 45: VIP - Leveraging HP Business Process Testing

45 of 48

Test Execution Setup Options

• One Test Case, Many Iterations• Easy to Manage / Change• Single Host Execution• Less Detailed Quality Center Reporting

• Many Test Cases, One Iteration• Difficult to Manage / Change• Multiple Host Execution• Granular Quality Center Reporting

Page 46: VIP - Leveraging HP Business Process Testing

46 of 48

“Classic” BPT vs. External Database

• Test Data Managed in “Classic” BPT• Each Classic BPT Test Cases must be Updated

Individually• No Good Way to Reporting on Test Case Data

• Test Data Stored in External DB• Finding and Managing Test Data is as Simple as

Querying MS Access• Reporting On Test Case Data is Also Simple

Page 47: VIP - Leveraging HP Business Process Testing

47 of 48

Summary• Reviewed Business Process Testing• Discussed Existing Database Driven

Test Suite• Explained Business Case for Upgrading

to BPT/QTP• Described Building the New BPT/QTP

Solution• Demonstrated How to Add BPT Data-

Driving Component• Discussed Lessons Learned

Page 48: VIP - Leveraging HP Business Process Testing

48 of 48

Questions ?