Workflow based performance testing
Suresh Srinivasan
Contents
•
Overview•
Single user business process explanation•
Workflow based business process scenario•
Methods to simulate the conditions•
Challenges to be met•
Database preparation3 © Virtusa Corporation ● Confidential
Overview
•
Business processes and its varieties
– Single user processes
– Multi user processes
•
User role and its impact
– Single user role per process – Direct simulation for load testing
Application examples
•
Shopping portals
– Typically a registered users completes a set activities related to procurement
•
User scenarios in Banking, Financial applications etc
– An account holder transact using various facilities
•
Online reservations
– Registered users search, book or cancel tickets
One common aspect to note here is only one user works through the
process start till end and might have multiple iterations before logout
5 © Virtusa Corporation ● Confidential
User view
Typical single user
tasks
Process flow
Login
Task1 Task2 Task 5
Task 3
Task 4
Logout
Task1 Task2 Task3
Task1 Task2 Task3 Task4
Business Process 1
Business Process 3
Business Process 2
• User role within a process remains the same • Multiple process threads with defined user roles • Process could be iterative
7 © Virtusa Corporation ● Confidential
Scripting approach simulating the loading scenario
Login
Task1 Task2 Task 5
Task 3
Task 4
Logout
Task1 Task2 Task3
Task1 Task2 Task3 Task4 Business Process 1
Business Process 3
Business Process 2 Script 1 20 Users 5 iterations
Script 2 30 Users 3 iterations
Script 3 50 Users 1 iteration
Application examples
•
Insurance policy processing
– Where roles like sales person, agents, underwriters, insurance experts etc are involved in each process depending upon the need
•
Bank loan processing
– Here the roles include sales person, appraiser, approver, cashier, dispatcher etc are involved to process a loan
•
Order processing
– Order processing involves Quoting, evaluation, approval, delivery, etc and from one stage to the other lot of work is involved
•
Hospital management
– This process involves Medical assistant, Primary analyst, Final analyst, approver, report processing etc to handle a patient from start to end of the treatment process
Here the common aspect to note is, multiple users work in a process
in different stages to complete the end-to-end business process
9 © Virtusa Corporation ● Confidential
Process view
WORKFLOW TYPE BUSINESS PROCESS
Repeat Task 1
Repeat Task 2
Repeat Task 4 Repeat Task 5
Workflow based business process
Repeat Task 3 Role 1
Role 2
Role 3
WORKFLOW TYPE BUSINESS PROCESS
11 © Virtusa Corporation ● Confidential
User view
Repeat Task 1
Repeat Task 2
Repeat Task 4 Repeat Task 5 Workflow based business process
Repeat Task 3 Role 1 Role 2 Role 3 Role 4 Role 5 Login Logout Login Logout Login Logout
Login Logout Login Logout
•User role within a process could be more than one
•Different tasks are logically connected but need not be sequential real time •Each task is iterative
User view
13 © Virtusa Corporation ● Confidential
Real Office Workflow Scenario
Verifier 3
Typical roles in a Sales workflow
Assess Verify Verifier 1 Verifier 2 Assessor 1 Assessor 2 Sales Person 1 Sales Person 2 Sales Person 3 Sales Person 4 Sales Person 5 Dispatcher 1 Dispatcher 3 Dispatcher 4 Dispatcher 2 Dispatcher 5 Approve Approver 1 Approver 3 Approver 5 Approver 4 Approver 2 Dispatch New Order Specification: 100 Orders 40 Assessments 60 Verifications 100 Approvals 100 Dispatches
WORKFLOW TYPE BUSINESS PROCESS
•Throughput:100 orders to be processed in 8 hours
•Max load: 20 Concurrent users
Scripting approach
Repeat Task 1
Repeat Task 2
Repeat Task 4 Repeat Task 5 Workflow based business process
Repeat Task 3 Role 1 Role 2 Role 3 Role 4 Role 5 Login Logout Login Logout Login Logout
Login Logout Login Logout
Script 1
Role -Sales Person Work Item -New order 5 V-users
20 Iterations
Script 2
Role -Assessor Work Item - Assessment 2 V-users
20 Iterations
Script 3
Role -Verifier Work Item -Verify order 3 V-users
20 Iterations
Script 4
Role -Approver Work Item -Approver 5 V-users
Script 5
Role - Dispatcher Work Item – Dispatch 5 V-users
20 Iterations
15 © Virtusa Corporation ● Confidential
Simulation of the scenario
DB
Scripts App
Test data
DB to contain live data required for 20 users to process 100 orders in the cyclic manner through a day
Application to show the assigned tasks for all the 20 users when they login and claim from their work queue
Scripts for all the 5 work items (tasks) New order, Assess, Verify, Approve and Dispatch need to be available
Test data for all the above work items for 20 users for 20 iterations need to be available
Test execution challenges
•
DB to be pre-loaded with real time data
– Approach
– Automation
•
Upfront we may need to extract the process id’s
– To prepare test data
– for the individuals to claim their tasks
•
There could be pagination issues for higher iterations
– When the number of tasks exceeds one page length, there could be multiple pages from where the task has to be picked up by the virtual user
17 © Virtusa Corporation ● Confidential
Test execution challenges - Contd
•
In order to repeat the tests after each load run, DB to be copied and retrieved
– This reduces time required for test preparation
– Same test conditions are repeated for consecutive runs
•
Role allocation for the tasks
– Single role assigned for multiple tasks
– Multiple roles assigned to perform a single task
Backend data preparation
•
Options
– DB scripts to fill various tables according to the planned task for all the virtual users
• DB integrity issues
• Data accuracy
• Time content
– Using performance test scripts to complete various tasks
• Requires very high protection for the DB maintenance
19 © Virtusa Corporation ● Confidential
Backend data preparation
Repeat Task ١
Repeat Task ٢
Repeat Task ٤ Repeat Task ٥ Workflow based business process
Repeat Task ٣ Role ١ Role ٢ Role ٣ Role ٤ Role ٥ Login Logout Login Logout Login Logout
Login Logout Login Logout
Initiate 400 orders at this point
Release 300 orders from this stage using Performance test scripts
Release 200 orders from this stage
Release 100 orders from this stage
WORKFLOW TYPE BUSINESS PROCESS
•
Objective: Assigning 100 task items for each stage ( 4 X 100)
Conclusion
•
Workflows involves simulation of business processes with multiple roles
•
There could be multiple user roles within a business process
•
Though the tasks involved in a process are logically connected, they are
individually repetitive in nature asynchronously
•
Simulation requires backend data preparation to show the assigned tasks
•
Well defined process is required to manage reusability of test data for each run
Thank You….
21 © Virtusa Corporation ● Confidential
USA UK INDIA SRI LANKA
www.virtusa.com
© Virtusa Corporation ● Confidential
"Virtusa" is a trademark of the company and a registered trademark in the EU and In India. "Productization" is a service mark of the company and a registered service mark in the United States.
"vRule" is a service mark of the company. All Rights Reserved