13
Business Process Testing Practicing Component Based Testing Deloitte Consulting LLP 13 th Annual International STC in India 2013 Author: Suman Rajwar Siddharth Roy

Business Process Testing - QAI Global Servicesconference.qaiglobalservices.com/stc2013/PDFs/Suman_Rajwar.pdf · Business Process Testing is a testing technique which is gaining importance

Embed Size (px)

Citation preview

Business Process Testing Practicing Component Based Testing

Deloitte Consulting LLP

13th Annual International

STC in India 2013

Author: Suman Rajwar

Siddharth Roy

Business Process Testing 2

Abstract

Innovation Downs Unless… You have the Right Building Blocks, that why when using BPT Component Based approach, one

should be aware of what need to be developed as Right building blocks.

The Business Process Testing (BPT) is an automated and manual testing solution for test design, test creation, test maintenance, test

execution and test data management. It aligns testing with business objectives and dramatically reduces test cycle time by leveraging

business subjects matter experts in the test design and quality optimization process. It also gives confidence that the critical business

process are functioning correctly. Business Process Testing introduces the concept of reusable business components for test design.

This helps to drastically reduce the test maintenance and help improves the test efficiency for test creation.

Business Process Testing with HP Application Lifecycle Management (ALM) enables non-technical Subject matter experts (SME)

to build and work with business components in a script free environment and to create an application-quality business process tests.

This approach allows the SMEs to create BPT in ALM without even opening QTP. Also data can be added to Business Process Test

from within ALM. BPT allows the QA and the testing teams to start the test design process much sooner, during system design and

hence accelerating the time-to-deployment for high-quality software.

So the main advantage is that BPT integrate with ALM better and if designed correctly, non-technical users should be able to easily

create their own automated scripts. It provides the framework to design and develop reusable test components and flows based on the

business process models.

HP ALM – ‘Business Components’ module is utilized to create and store the business components. HP ALM – ‘Test Plan’

module is used to create the business process test, the Subject Matter Experts (drags and drops) the components that apply to

business process test and configures their run settings. HP ALM – ‘Test Lab’ module is used for running the Business Process tests

and analyzing the results. Testers have the run and debug options in Quick Test Professional to run and debug an individual

component.

Few of the high level objectives and expectations from BPT approach mentioned further down:

BPT can be implemented in the manual testing

approach by the SMEs

Business components are used to create Business

Process Tests.

Components in the business process tests can be

associated to test requirements and can provide the correct coverage of the requirements for the applications.

Business Process Testing is a testing technique which is gaining importance these days in many domain specific applications like

SAP. Most of the SAP testing projects use BPT framework to test application under test. This white paper presents a brief overview

of the HP Business Process Testing concept and its advantages for business and test teams. It also provides an insight into the

implementation of Business Process Testing using Component Based Testing for a SAP Testing Project.

Business Process Testing 3

TABLE OF CONTENTS

Abstract ................................................................................................................................................................................................. 2

Business Challenge ............................................................................................................................................................................... 4

Need of an hour ......................................................................................................................................................................... 4

Factors That Affects SAP Test Automation – Problem ............................................................................................................ 4

BPT can be proven a better approach by – Solution ................................................................................................................. 5

BPT Industry Benefits after Implementation ........................................................................................................................... 5

What is Business Process Testing ......................................................................................................................................................... 7

BPT is a Transformation, Not a Technology............................................................................................................................. 7

How to Implement Business Process Testing ........................................................................................................................... 7

Checklist: Business Could Benefit from Business Process Testing If…................................................................................... 7

How to Get Started: Five Steps to Transformation ................................................................................................................... 7

How Business Process Testing Works ...................................................................................................................................... 8

Practicing Component Based Testing ................................................................................................................................................... 8

BPT Framework ........................................................................................................................................................................ 8

BPT with ALM ......................................................................................................................................................................... 9

Workflow in BPT Framework in QTP ...................................................................................................................................... 9

Advantages of BPT Framework ................................................................................................................................................ 9

Disadvantages of BPT Framework............................................................................................................................................ 9

Practical approach of applying BPT to the Project ................................................................................................................... 9

Components in BPT Framework ............................................................................................................................................. 10

BPT Example .......................................................................................................................................................................... 12

Summary ............................................................................................................................................................................................. 13

References ........................................................................................................................................................................................... 13

Business Process Testing 4

Business Challenge

The landscape of SAP is constantly evolving and thus the continuous change to the SAP applications are expected for SAP

Implementation Project. Understand how these changes are going to impact the costs, time-to-market and system availability is

critical for the success of the business. Here comes the BPT Component Based Testing Technique as a solution to all problems.

If the Business Customers has a strategic business initiative to move to SAP and leverage one of the SAP‘s newest modules or to

implement any changes/interruptions to the business process which needs to be fully inspected over to ensure that the SLA‘s are met

and operational efficiencies are maintained.

In an effort to optimize the business process, Business Customers gazes for the different innovative ways which would help them to

meet the SLA‘s. For an example, the customers dealing with logistics would finds out means to decrease inventory on hand through

the use of outsourced warehouse facilities and decrease the time to deliver the spare parts by adding regional distribution centers

closer to major customers for the business. Before launching this type of logistics project, Business Customers needs to understand

the SAP infrastructure, required to automate the acquisition of new outsourced warehouse partners, roll-out additional regional

distribution centers, and support the rise in order volume over time, without cost over-provisioning.

Business Process Testing is a testing technique which would help the Business Customers to meet their objectives. Most of the SAP

Implementation Testing projects use BPT framework to test the application under test. The purpose of this document is to provide

acumen into the implementation of BPT using Component Based Testing for any SAP Implementation Testing Project.

Need of an hour

HP Business Process Testing can also help business customers get more out of the tools they have already purchased, as it is part of

HP ALM, which is an integrated set of software, services and best practices for automating key quality activities including

requirements management, test management, defect management, functional testing and business process testing. HP BPT

assimilates smoothly with any work already done with HP QuickTest Professional software or HP Win Runner software. HP ALM

products support more than 90 percent of the Fortune 500 and more than 65 percent of all automated software quality initiatives.

In short, HP BPT is capable of raising the productivity of subject matter experts and QA/test engineers alike—not by small

increments, but by quantum leaps. Business Customers can expect high ROI and fast payback from their transition to HP BPT.

Factors That Affects SAP Test Automation – Problem

Type Factor Severity Comments

Project Test Scope High If the complexity of application as well as the test scope is complex in nature, then

it would consume huge efforts to automate each test script.

Application Repeat

Functionality

High It is quite easier to automate incase the functionality repeats across the

application.

Framework Availability High Good framework makes the scripting, debugging and maintenance easier.

Framework needs continuous updation across the script development.

Process Standardize High If automation processes are not well-defined, standardized and communicated

within the different teams, then this leads to increase in effort and makes tough to

measure the progress of automation.

Environment Availability Medium Stable environment should be there till the completion of automated test script. If

not, environment issues would consume huge efforts to solve.

Functionality Skill Medium Automation team should collaboratively work with the process team to understand

the functionality, resolve the defects and test data issues.

Application Custom

Objects

Medium The number of custom objects in the automation scope matters as it becomes

overhead for the test automation team to build and maintain the libraries for them.

Scripter Skill Medium This would cost to the project. The right skill packages of the scripter are very

essential for any good test automation.

Business Process Testing 5

BPT can be proven a better approach by – Solution

Conducting automation feasibility study at the start helps the lead developer to understand the repeat functionality of the

application and provide better estimation for the effort.

Dividing the complex test script into smaller test scripts is reducing the automation complexity.

Creating execution document and recording the manual execution will help for future references, reduce the dependency and

improve the functionality skill.

Defined roles and responsibilities for each team and walkthrough with the process teams set clear expectations within the

teams.

Working in collaboration with the process teams to resolve the functional queries reduces the automation script creation

time.

Imparting functional knowledge by conducting knowledge Transfer Sessions to the automation team improves the skill of

automation developers.

Standardizing the process, documents, status tracking and metrics reporting will be helping the management to track the

automation tasks better.

Implemented POC concept for each Test scripts and peer-reviewer for each component to reduce the tasks on Lead

developer.

The industry benefits after the implementation would be

Get innovative new application services up and running sooner, bringing in new customers and new revenue streams, and

making employees more productive.

Gain a competitive edge over competitors that are still doing things the old, slow, expensive way.

Avoid the costs of software defects and reap the rewards of consistently excellent applications and web services, greater

customer satisfaction, more repeat business, higher revenue and profits.

Get LOBs more involved in more testing projects more quickly and at a lower total cost.

It increases the productivity of subject matter experts and QA/test engineers alike—not by small increments, but by quantum

leaps.

Business Enterprises can expect high ROI and fast payback from their transition to HP BPT.

As the BPT approach builds tests by dragging and dropping components, No more programming and No record and replay

required.

Reuse a same component throughout hundreds of test cases, No more re-inventing the same wheel.

Cuts the time and effort spent on test maintenance.

Eliminate duplicate script maintenance by isolating changes to a single component that is reused by all test scripts.

No more updating all scripts individually.

BPT is for Subject-Matter Experts not for Technical analyst.

Business Process Testing 6

Create Automation Script

DeveloperLead DeveloperProcess TeamAutomation Team

Lead

Cre

ate

Au

tom

atio

n S

crip

t

No

Check the components

assigned

Prioritize & work on assigned

components

Update the component status

daily

Creation Completed

With the updated design

document

No

Peer-Review

Peer-ReviewSuccessful

Yes

No

Yes

Fun

ctio

nal

ity

Ch

eck

Faile

d

Up

dat

e Th

e C

om

po

nen

t

Review the Functionality of the

Component

Functionality Check

Successful

No

Peer-ReviewChecklist Document & Design

Document

Pee

r-R

evie

w F

aile

dU

pd

ate

The

Co

mp

on

ent

Automation Script Creation Completed

SendDocuments

Yes

Conduct Component Review Meetings

with the Team

Update Dates, Status, % Comp, as

appropriate

Run Report Weekly

Publish ReportsTo TeamTo CustomersTo MCM

Update:% CompletedActual Development Time

Update:% Completed = 90%Status = Ready for Review

Update:% Completed = ActualStatus = Maintenance

Assign Components

& Identify Peer-Reviewer

Receive Request for Automation

Handoff Successful

Yes

No

Sign

-Off

Fai

led

Up

dat

e th

e C

om

po

nen

t

Test ScriptProgress Tracker

E-mailConfirmation

Test Script progress tracker (e-mail): Sign-Of f Status as ‘Completed

Test ScriptProgress Tracker

Fwd. the E-mail confirmation

Check All The Components Are Created

& Test Script Tested

YES

Update:% Completed = 100%Status = Ready

Update:% Completed = ActualStatus = Maintenance

Plan Handoff Session Send the Test Script progress tracker & design document

Update:% Completed = 95%Status = Ready for Review

Figure 1: Automation Script Creation Process Flow

Business Process Testing 7

What is Business Process Testing?

BPT is a Transformation, Not a Technology

HP Mercury recognized that solving the challenges of traditional test automation required a new approach, not another new

technology. HP Mercury has developed a new approach Business Process Testing (BPT) that radically streamlines test design, test

automation, test maintenance, and test documentation.

Business Process Testing in a nut shell is used for designing business components that can be reused in business process tests. It

provides non-technical subject matter experts to create the test scripts from the reusable components/flows. BPT with HP ALM

enables non-technical subject matter experts to build and work with business components in a script-free environment and to create

application-quality business process tests.

How to Implement Business Process Testing

One of the most important gains of BPT is that it leverages tools, technologies, and skill sets many companies have already invested

in, such as HP Mercury QuickTest Professional, HP Mercury Quality Center applications. That means the incremental cost of

transitioning to BPT is likely to be small, while the potential benefits to testing teams and business are substantial.

Checklist: Business Could Benefit from Business Process Testing If…

Whether software testing is currently manual, automated, or a mix of both, there is a good chance that the business could benefit by

transitioning to Business Process Testing. Here are a few guidelines for evaluating the extent to which BPT can help in cutting costs

and improving efficiency. In general, to determine whether the existing business is a good contender for BPT only if:

There is overlap between processes. If many of business processes share common elements or steps, BPT will allow to use- and

reuse- the components and common functions. The more overlaps in the processes, the more one can reuse components over and

over, and the more benefit will be realize.

You are currently transitioning to automated testing. Automation is the key for improving the speed, accuracy, and flexibility of

the software testing process, and can give the company the ability to find and fix more defects earlier. If you are currently in the

process of moving to automated testing, you may have already purchased the basic tools needed for BPT, and establishing BPT as

your next milestone can help accelerate your company‘s adoption of automated testing practices and their benefits.

You are evaluating or moving toward the Quality Center of Excellence model. This model is becoming significantly popular

because it provides a centralized source of testing expertise as well as standardized quality management and optimization best

practices. While the Quality Center of Excellence model is not necessary for BPT, centralizing the company‘s test automation

expertise can be an effective way to optimize the efficiency and consistency of the test projects.

How to Get Started: Five Steps to Transformation

The effort required to transition to Business Process Testing may be a matter of a few hours or a few days, in many cases. This

section summarizes five easy steps to get up and running.

Step One: Get the Tools. Many companies already have licensed and installed some or all of the key tools needed for BPT. The

complete set of tools is contained within the HP Mercury Quality Center software suite. If you‘re already using HP Mercury

QuickTest Professional and HP Mercury Quality Management applications, you already have most of the tools you‘ll need to move

up to Business Process Testing.

Figure 2: Steps for BPT Transformation

Business Process Testing 8

Step Two: Get Some Additional Training. To jumpstart your productivity using HP ALM, you may need a small amount of

additional training. Subject-matter experts who are adept at using Quality Management applications, but they may require some two

to three hours of additional training for HP Mercury QuickTest Professional.

Step Three: Start Creating Your Test Components. With proper tools and training, you are ready to begin laying out actual test

cases using the keyword-driven, component-based approach. At this point, you will need to make decisions about the scope of

specific components (decide what level of functionality is to be included within each one), and begin actually creating your

components.

Step Four: Start Creating Actual Business Process Tests. Using drop-down lists of components, you can now begin assembling

actual user flows. If you‘re missing a needed component, you can use HP ALM to create one and add it to the business process flow

on the fly.

Step Five: Automate your Components. Once the subject-matter expert has filled out the business process template with stepped-

out components, the components are ready to code and can be forwarded to QA/ Test engineers. The engineers then automate the

components, adding detailed checkpoints, error handling capability, and so on.

How Business Process Testing Works

The transition from table-driven test frameworks to business process testing is evolutionary in terms of technology, but revolutionary

in terms of capabilities. The next sections describe the core concepts underlying Business Process Testing comprising the BPT

Framework, Advantages/Disadvantages and the Practical approach of applying BPT to a project.

Practicing Component Based Testing

BPT Framework

The BPT framework focuses on Component Driven approach expediting automation implementation and reducing maintenance

effort significantly. It happens because the automation implementation starts even before application is ready and the main business

focus is on testing.

The reusability of automation steps written for test cases is a very hard term to achieve. But by using BPT framework early in the

development cycle, reusability can be achieved. It consists of:

Reusable business components

Business components converted into Business process

tests

Business components are reusable units that perform a specific

task in business process. Wherein, business process is a

compilation of related activities performed to achieve task as

requested by the customer. If any change needs to be done, then

making it in only the business component would suffice the

need.

The explanation on this part will be clear by looking at the

diagram of component based design in context to a Sales

application. It shows three business flows which in turn are

combination of business components (For e.g., ―Create New

Quote‖ is a business component)

Note: Business components common to different business flows

are marked in same color. For example ―Save Quote‖ component

is being used in all three business flows at different places.

Business Process Test on the other hand is a scenario comprising

of business components. It is based on the philosophy that any

enterprise application involves a number of business processes to

be tested. BPT supports new methodology for testing, by

combining various plug-in tools like QTP, Selenium, etc.

Figure 3: Component Based Design

Business Process Testing 9

BPT with ALM

HP Application Lifecycle Management (ALM) supports BPT for allowing non-technical Subject Matter Experts to quickly build

data-drive and document tests at one place. It uses reusable component based approach for test design and in turn accelerating test

design process. The maintenance effort is reduced so much so that a change in the component gets reflected in all the flows using the

component. Before an application is delivered to QA, ALM with the plug-in tools like QTP allows test automation to start much

earlier in the development lifecycle. Its component based approach expedites automation implementation and in turn reducing

maintenance effort significantly. BPT with ALM consists of three unique entities, namely application component, business

component and business flow.

BPT approach is specifically designed for the participation of non-automation users. BPT starts automation implementation even

before the application is ready and its business focus is on testing only. BPT approach allows its users to investigate quality assurance

efforts earlier in the application development lifecycle. Since, the testing approach adopted by ALM and BPT can also be based on

Keyword driving component testing, the automation of tests can occur without the need for recording application flows from a stable

application.

Workflow in BPT Framework in QTP

Business Process Testing (BPT) Framework is the framework where

you can divide the test cases into multiple flows and each of these

flows is scripted by using a Business Process Component. When all

the components for a particular test case are ready, you can link the

components one after the other as per the test case flow and execute

the BPT test case from ALM.

The illustration # 4 represents the workflow of the BPT Framework

Advantages of BPT Framework

BPT Framework allows non-technical subject matter experts to quickly create and run tests using the business process

components

A lot of features such as component linking & data parameterization come built in with the BPT Framework. Because of

this the automation testers do not need to spend extra effort to write code for these functionalities

Eliminates the need of creating a separate framework for the Automation

Both input and output parameters can be directly added in HP ALM

A manual tester can remove the unwanted component from the test flow without affecting the code

Single point of maintenance for all elements associated with the testing of a specific part of your application

High reusability with data-driven test components

Quickly test multiple flows , suitable for agile frameworks

Testers need not require to have technical expertise in automation once the components are build

Disadvantages of BPT Framework

BPT Framework can be used only if you have ALM access.

Need to purchase additional license for BPT Framework if we want to use this for the test scripts.

Practical approach of applying BPT to the Project:

Create components from ALM using scripted components.

Create atleast one initialization / driver component.

Create separate component for each reusable functional flow.

Create Verification components.

Create new tests by choosing test type as ―Business Flow‖.

Drag and drop components into test case templates under test plan

Link parameters between components

Add the tests to test sets in test lab and begin execution when application is ready for testing

Figure 4: BPT Framework

Business Process Testing 10

Components in BPT Framework

Application Area: Application Area acts as a container or a place holder that stores the Business Process Components and

other related items such as function libraries, object repositories etc.

Business Process Component: Just like functions or actions that can be used to store re-usable code, BPT framework has

Business Process Components in which you write the scripts for an action.

Above mentioned are the two components that are available specifically in BPT Framework. Other than these, you will have

the standard components like functions libraries, object repositories, recovery scenarios, data sheets etc. as part of your BPT

Framework.

Component based testing consists of six important elements –

Business components

Parameters

Flows

Iteration

Associate requirements

Build and run business process tests

Below picture give the reference of these elements in ALM

Figure 5: Essential elements in ALM

Figure 6: Iterations screen

Business Process Testing 11

Business Process Test (BPT)

A scenario comprising of a sequence of business components or flows, designed to test a specific business process of an application.

Business Component

A business component is an easily-maintained, reusable unit comprising of one or more steps that perform a specific task.

Functional team defines each step for the component

Business components can be used in multiple tests and flows

Business components can have input values from an external source or from other components, and they can return output

values to other components

HP ALM - ‗Business Components‘ module will be utilized to create and store the business components.

Input and Output Parameters

Input component parameters make business components more flexible and make it easier to reuse the same component in multiple

business process tests and flows—by supplying different input values, you can change how the component performs according to

those values.

Output component parameters allow data values retrieved from a component step in one component to be passed to a subsequent

component in the business process test or flow.

The Parameters tab enables you to define component parameters that allow a business component to receive data from an external

source and/or return data for use in other components or flows.

Flow

A logical set of business components that can be executed as a unit is called as ―Flow‖

It is a type of test, consisting of business components in a fixed sequence that performs a specific task

You can use flows in multiple business process tests

Flows can be used in multiple tests

Iteration

Defining iterations enables you to run business components, flows, and tests multiple times, each time using different parameter

values. In simple terms, maintaining asset dependency means linking all related test assets together so that impact analysis can be

done on changing one asset that is related to other assets.

Assigning Requirements to Components

The ‗Req Coverage‘ tab enables you to define requirement coverage by linking your business process tests and flows to

requirements. Testing requirements are created in the Requirements module of HP ALM

The tab provides a list of all the testing requirements defined in the Requirements module, and enables you to map the specific

requirements to the currently selected business process test or flow. This enables you to methodically build your business process

tests and flows according to preplanned requirements, and also to review the extent to which your tests and flows cover these testing

requirements

Requirements will be associated to a particular component in the test instance that will help to track the requirements better and in

finer detail

Build and run business process tests

HP ALM - ‗Test Lab‘ module is used for running Business Process Tests and analyzing the results. Testers have the run and debug

options in Quick Test Professional to run and debug individual components.

Business Process Testing 12

BPT Example

BPT Framework may require some reusable functions, components or flows. Some of the examples of these that can be incorporated

when building a BPT framework and while creating a business process tests or components are as below:

Initialize /Driver script: - This component sets up the environment variables that are necessary for all components to share, such as

data table path and row. It also opens a session of IBM PCOM (for legacy) if needed in the business scenario to be tested.

InitializeComponentForTesting "C:\Temp\Book1.xls":- this line defines a datatable path to use for the inputs and outputs of the

component. It also set initializes variables that need to be set up before InitializeComponent is called. Even if you are not using a

datatable for your testing, you need to provide a valid path to a spreadsheet. This needs to be called at the beginning of every

component, when running the component directly from QTP.

InitializeComponent: - This line performs some initial checks to determine whether the component will run. It also imports the

datatable into QTP. The line of code allows components in the same BPT to access the same datatable without needing to define the

datatable path as a parameter in each component. It also sets up some global variables that can be accessed in the script such as the

environment that the test is running in. This needs to be called at the beginning of every component.

InitializeBrowser: - This line will reset the global Browser, Page, Frame, and Window objects to nothing. This needs to be called at

the beginning of every CRM Web UI component.

SetDebugMode True: - This line turns debug mode on. If debug mode is on, functions that are written to handle debugging will

cause the active objects to be highlighted before actions are executed. If debug mode need to be off we can use SetDebugMode False.

Portal launch and login: - This component closes all existing open sessions and portals. It then opens a portal and logs in to the

specified environment and system.

LoginToCRMWebUI strEnv, strUser, strPassword, strRole: - This line will launch the CRM Portal, login, navigate to the correct

environment in CRM Web. The remainder of the component code should go, as defined by the process flow. The majority of this

code should be function calls from the CRM Web UI function library. It should include validations as defined by the script, and

proper error handling for any errors that could be expected.

Figure 7: Sample BPT Script for SAP Application

Business Process Testing 13

Summary

By introducing Business Process Testing, Mercury has brought test automation into a new era. Mercury Business Process Testing

removes the technical complexity and specialized expertise from the test design process, so subject-matter experts can focus on the

business process rather than the test.

Business Process Testing delivers a higher level of productivity to your test teams and a higher level of quality to the finished

software applications. The transition to Business Process Testing is non-disruptive to your current processes, protects your previous

investments in tools and training, and delivers a high ROI that is likely to be competitive with any other investment the business will

make. The question to ask oneself is not “How you’ll manage the transition to Business Process Testing”, but “How you ever

managed without it”.

References

http://www.techgig.com/skillpage/Testing/All-about-Business-Process-Testing-BPT/1016

http://www.softwaretestingstuff.com/2008/11/business-process-testing

http://testerhome.blogspot.com/2008/02/what-is-business-process-testing

http://opkey.crestechglobal.com/blog/what-is-business-process-testing/

This publication contains general information only and is based on the experiences and research of Deloitte practitioners. Deloitte is

not, by means of this publication, rendering business, financial, investment, or other professional advice or services. This publication

is not a substitute for such professional advice or services, nor should it be used as a basis for any decision or action that may affect

your business. Before making any decision or taking any action that may affect your business, you should consult a qualified

professional advisor. Deloitte, its affiliates, and related entities shall not be responsible for any loss sustained by any person who

relies on this publication.

As used in this document, ―Deloitte‖ means Deloitte Consulting LLP, a subsidiary of Deloitte LLP. Please see

www.deloitte.com/us/about for a detailed description of the legal structure of Deloitte LLP and its subsidiaries.

Copyright © 2013 Deloitte Development LLC, All rights reserved.