Professional Documents
Culture Documents
Tarun Lalwani - Best Practices For Your HP BPT Framework
Tarun Lalwani - Best Practices For Your HP BPT Framework
Tarun Lalwani
2010 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice
2010 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice
Working with Infosys since 2004 Working on QTP since version 8.2 16000+ Posts on various QTP Forums Author of the first ever book on QTP QuickTest Professional Unplugged Winner of QTP 11 Beta Best Feedback Award Winner of 2nd ATI Automation Honour Awards Expertise in Framework design using QTP, QC and BPT
the application
using customer care user id a new user and close the application the application the new user
Create Logout
Launch Login
Approve Logout
User User
Approve Logout
Close Application
Created 6 reusable components Easy to use and remember 10 components called in the Business Process Test High reusability
OPTIMIZING SCRIPTS
Optimizing Scripts
unnecessary parameters (run-time or hardcoded) test data needs using concepts of Smart Tags # of components required to implement scripts
10
SMART TAGS
Smart Tags
Smart Tags are special tags used for data generation Developed at Infosys, not provided by the default BPT framework Allow creating dynamic data at run-time Eliminates the need to update input data in certain scenarios Parsed and converted to actual value by component Can be combined with static text Multiple Tags can be used for the same parameter
12
#NEW#
Select a new value always from the control Read the value from Environment variable Read the value from component parameter Read the value from datatable parameter
13
14
Specific to Application Under Test Used to execute flow and capture generated values at run-time Example - #NEWCUSTOMER[Tarun,Lalwani]# generates a new customer with the specified first name and last name
15
FLEXIBLE COMPONENTS
Flexible Component
Instead of building high # of re-usable components build larger flexible components Combine commonly performed actions into a single component Add Boolean flags to control actions to be performed Use functions to perform specific Actions in component Use Scripted component instead of Business component
17
19
Analyze
Merge
Unit Test
Update Script
20
Developed at Infosys, Tool analyses existing BPT scripts and recommends which components can be merged for optimization Sample Graph recommending merging of Login and Open User (84%) components Bad Login
3% Create User 13% Create User Open User Bad Login Open User 84%
Re-usable components required in the Test suite is reduced The flexibility/re-usability remains similar or even higher Less components required per Business Process Test Reduction in development and maintenance effort Reduction in Execution time
22
Developed at Infosys, Tool to convert BPT Scripts to a Single QTP Script BPT2QTP.QFL to be added to the converted script to support the changes Resolves output to input short-circuiting of parameters Ability to fetch run-time parameter values directly from Test Set
25
Faster execution of scripts (20% - 50% faster) Easy to debug scripts Capability to resume scripts from any component, remembers the run-time parameter values of last run using external XML file
26
THANK YOU