Workflow based performance testing Suresh Srinivasan September 2008
Contents Overview Single user business process explanation Workflow based business process scenario Methods to simulate the conditions Challenges to be met Database preparation Conclusion 2 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 Multiple user role per process Requires detailed preparation 3 Virtusa Corporation Confidential
SINGLE USER BUSINESS PROCESS 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 4 Virtusa Corporation Confidential
SINGLE USER BUSINESS PROCESS User view Typical single user tasks 5 Virtusa Corporation Confidential
SINGLE USER BUSINESS PROCESS Process flow Business Process 1 Task 3 Task1 Task2 Task 5 Task 4 Business Process 2 Login Task1 Task2 Task3 Logout Task1 Task2 Task3 Task4 Business Process 3 User role within a process remains the same Multiple process threads with defined user roles Process could be iterative 6 Virtusa Corporation Confidential
SINGLE USER BUSINESS PROCESS Scripting approach simulating the loading scenario Business Process 1 Task 3 Script 1 20 Users 5 iterations Task1 Task2 Task 5 Task 4 Business Process 2 Script 2 30 Users 3 iterations Login Task1 Task2 Task3 Logout Script 3 50 Users 1 iteration Task1 Task2 Task3 Task4 Business Process 3 7 Virtusa Corporation Confidential
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 8 Virtusa Corporation Confidential
Process view Workflow based business process Role 2 Role 1 Repeat Task 2 Role 4 Role 5 Repeat Task 1 Repeat Task 4 Repeat Task 5 Role 3 Repeat Task 3 9 Virtusa Corporation Confidential
Impact of login 10 Virtusa Corporation Confidential
User view Workflow based business process Role 2 Repeat Task 2 Role 1 Role 4 Role 5 Login Logout Repeat Task 1 Repeat Task 4 Repeat Task 5 Login Logout Role 3 Login Logout Login Logout Repeat Task 3 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 11 Virtusa Corporation Confidential
User view 12 Virtusa Corporation Confidential
Real Office Workflow Scenario Specification: Throughput:100 orders to be processed in 8 hours Max load: 20 Concurrent users 40 Assessments 100 Orders Typical roles in a Sales workflow Assessor 1 Sales Person 1 Sales Person 2 Assess Assessor 2 Approver 1 Approver 2 Dispatcher 1 Dispatcher 2 New Order Sales Person 3 Sales Person 4 Approve Approver 3 Approver 4 Dispatch Dispatcher 3 Sales Person 5 Verify Verifier 1 Verifier 2 Approver 5 Dispatcher 4 Dispatcher 5 100 Approvals 100 Dispatches Verifier 3 60 Verifications 13 Virtusa Corporation Confidential
Scripting approach Script 2 Role -Assessor Work Item - Assessment 2 V- users 20 Iterations Script 1 Role -Sales Person Work Item -New order 5 V-users 20 Iterations Role 1 Repeat Task 1 Workflow based business process Role 2 Repeat Task 2 Role 4 Role 5 Login Logout Repeat Task 4 Repeat Task 5 Script 5 Role - Dispatcher Work Item Dispatch 5 V-users 20 Iterations Login Logout Role 3 Login Logout Login Logout Repeat Task 3 Login Logout Script 3 Role -Verifier Work Item -Verify order 3 V-users 20 Iterations Script 4 Role -Approver Work Item -Approver 5 V-users 20 Iterations 14 Virtusa Corporation Confidential
Simulation of the scenario DB DB to contain live data required for 20 users to process 100 orders in the cyclic manner through a day App Application to show the assigned tasks for all the 20 users when they login and claim from their work queue Scripts Scripts for all the 5 work items (tasks) New order, Assess, Verify, Approve and Dispatch need to be available Test data Test data for all the above work items for 20 users for 20 iterations need to be available 15 Virtusa Corporation Confidential
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 16 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 17 Virtusa Corporation Confidential
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 18 Virtusa Corporation Confidential
Backend data preparation Objective: Assigning 100 task items for each stage ( 4 X 100) Target value: Loading 400 Orders in the backend (100 orders for each stage ) Workflow based business process Role ٢ Repeat Task ٢ Role ١ Role ٤ Role ٥ Login Logout Repeat Task ١ Repeat Task ٤ Repeat Task ٥ Initiate 400 orders at this point Login Logout Role ٣ Repeat Task ٣ Login Logout Login Logout Release 300 orders from this stage using Performance test scripts Login Logout Release 200 orders from this stage Release 100 orders from this stage 19 Virtusa Corporation Confidential
CONCLUSION 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. 20 Virtusa Corporation Confidential
USA UK INDIA SRI LANKA www.virtusa.com For more information, please contact: SalesInquiries@virtusa.com 21 Virtusa Virtusa Corporation Corporation Confidential 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