Download presentation
Presentation is loading. Please wait.
Published byNicholas Knight Modified over 9 years ago
1
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. JavaScript testing – faster and easier using HP TruClient Wilson Mar, HP Architect / Developer Advocate Shlomi Nissim, HP R&D Manager
2
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 2 Faster and Easier JavaScript Testing Agenda You’re not alone Dive right in Approach Additional Resources Question & answer
3
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 3 http://www.youtube.com/watch?v=AOWQEU8hAXI TruClient introduction summary video http://h20621.www2.hp.com/video- gallery/us/en/d6b38cd914f8e534cdbf8025f076d2691779b562/r/video http://h20621.www2.hp.com/video- gallery/us/en/d6b38cd914f8e534cdbf8025f076d2691779b562/r/video = (no voice narration, just music) 2:16 minutes
4
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 4 http://www.youtube.com/watch?v=IuBxSbuNGDY HP LoadRunner 11.0 TruClient demo 14:32 minutes
5
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 5 http://www.youtube.com/watch?v=fZ8i9mke3tg HP LoadRunner 11.50 - Tutorial: TruClient Firefox 13:14 minutes
6
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 6 LoadRunner 11.52 patch 1 Support Matrix OSBrowserVuGenLoad Generator Win 7FF 8.01*, IE 9, IE 10 Win 8FF 8.01, IE 10 IE 9**N/A Win 2008 R2FF 8.01, IE 9, IE 10 * Firefox 8.01 is part of LoadRunner installation ** IE 9 is not supported on these operating system versions
7
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 7 LoadRunner 12.00 Support Matrix * Firefox 22 is part of LoadRunner installation ** IE 9 is not supported on these operating system versions OSBrowserVuGenLoad Generator Win 7FF 22*, IE 9, IE 10 Win 8FF 8.01, IE 10 IE 9**N/A Win 2008 R2FF 22, IE 9, IE 10 Win 2012FF 22, IE 10 IE 9N/A
8
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 8 Multiple interface options
9
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 9 Approach and strategy 1.User process, object identification, error detection 2.Configuration (for mobile, etc.) Explore Enhance Script Generate Script Set Run Config. Single-User Runs Multi-User Runs 6.Data value variations 7.Logging for troubleshooting 9.Analyze capacity from load test runs 3.Flow control, Alternative steps, Function Libraries 4.Transactions & Profiling 5.Data Correlation and Parametization 8.Files download
10
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 10 Agenda BrowsersHigh level functionality overviewObject IdentificationSteps synchronizationMobile
11
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Browsers
12
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 12 Firefox is included within LoadRunner
13
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 13 Static version of Firefox Alt+H Do not open this dialog. It will cause automatic update of Firefox
14
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 14 Internet Explorer 9 or above is a prerequisite TruClient enforces standards mode. Quirks is not supported
15
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Getting started
16
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 16 Create a new script
17
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 17 TruClient recording
18
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 18 Integrated with Mozilla Firefox Async is a none issue in TruClient
19
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 19 Recording and script generation is interactive
20
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 20 TruClient Toolbox drag and drop
21
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 21 Random wait calculation in JavaScript arguments
22
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 22 Data Parameters Use LR.getParam("URL "); to get the value
23
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 23 Data Parameter reference in JavaScript
24
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 24 Transactions
25
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 25 Function libraries Modularity and code sharing Function Reuse and Sharing Create Functions library Create functions Call Functions from every script Function Editing Select library and function Set function arguments
26
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 26 Event handlers
27
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 27 Settings
28
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 28 Snapshots
29
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 29 TruClient Custom Functions
30
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 30 Additional features added in LoadRunner 12.00 Shunra integration RendezvousVirtual Table Server JavaScript API Web page diagnostics*IP spoofing*Modem speed emulation* * New in TC IE. Existed in TC Firefox
31
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Object Identification
32
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 32 Object identification methods in TruClient JavaScript You can write code that will locate the object in the document Electors TruClient patented algorithm XPath You can write your own Xpath or use the automatically generated suggested Custom
33
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 33 Automatic Electors HP LoadRunner VuGen11.52
34
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 34 Dynamic object identification Assistant
35
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 35 Use related object to apply unique identification Related object
36
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 36 Modify step levels might fix issues while running HP LoadRunner VuGen11.52
37
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 37 XPath Initial values provided Multiple suggestions Keep in mind Xpath method is static For dynamc XPath (e.g. using parameters) use evalXPath option in the JavaScript id method
38
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 38 Pick item from list using XPath
39
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 39 Use DOM Inspector for complex XPath Locate the elements on the page, the tree will open
40
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 40 JavaScript Important when identification requires logic (e.g. parameterize) Initial value provided based on evalXPath of first Xpath suggested The last statement is what’s returned and used by the step JS function has a separate variable context from the script itself Access variable in script using ArgsContext.a for variable a and ArgsContext.LR.getParam(“a”) for parameter a.
41
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 41 JavaScript Record interaction with several options (e.g. radio buttons, table cells) Compare the Xpath values of the different objects and find the common XPath Change ID Method to Javascript and use evalXPath to get an array of objects: options=evalXPath("//div[@id=\"module-options- div\"]/div/div[2]/input"); Referance the array of objects to parameterize the object: random(options) – select a random item random(ArgsContext.item) – select an item based on the variable item random(ArgsContext.LR.getParam(“item”)) – select an item based on the parameter item
42
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Steps Synchronization
43
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 43 Automatic step end events
44
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 44 Replay events HP LoadRunner VuGen11.52
45
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 45 Replay step synchronization guidelines If there are no failures, stick with defaults. Make changes only if The script is not running correctly To measure transaction response time using different end events (and you know what you are doing ) Possible workarounds: Change end event Increase object timeout Increase step timeout Increase network timeout (in RTS) Add wait steps
46
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 46 Run-time Settings for replay HP LoadRunner 11.52 VuGen TruClient script
47
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 47 Step timeout
48
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 48 Object sync checkpoints HP LoadRunner VuGen11.52
49
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Transaction profiling
50
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 50 Profiler
51
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 51 Profiler
52
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. TruClient to Web(HTTP/HTML)
53
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 53 Powerful Small footprint, low cost Not real Web UI operation Elegant Real UI operation Big footprint, high cost 12.00 new feature – TC2Web
54
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 54 Powerful, generate high stress to AUT Have UI operation test Low cost 12.00 new feature – TC2Web
55
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 55 LoadRunner http traffic TC Event TruClient LR http server Web protocol recording proxy Web protocol script Browser Internet Tc2Web addin 12.00 new features – TC2Web
56
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Mobile device configuration
57
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 57 Recording mobile TruClient Ajax HP LoadRunner VuGen 11.51+ App web server Same User Agent in Firefox > Mobile device
58
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 58 Devices with User Agent strings Count: 27 (LR 11.52) HP LoadRunner VuGen11.52
59
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 59 Sample User Agent for Samsung Galaxy S3 User Agent string example Mozilla/5.0 (Linux; U; Android 4.0; xx-xx; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 720 x 1280 HP LoadRunner VuGen11.52 More at http://www.useragentstring.com/http://www.useragentstring.com/
60
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 60 Mobile Device Manager Tool
61
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Thank you
62
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Q&A hp.com/go/loadrunner
63
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 63 Standing by hp.com/go/education hp.com/go/hpswsupport hp.com/go/hpswprofessionalservices © Copyright 2014 Hewlett-Packard Development Company, L.P.
64
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 64 Downloads and sales hp.com/go/performancecenter hp.com/go/loadrunner Conference hp.com/go/discover © Copyright 2014 Hewlett-Packard Development Company, L.P.
65
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 65 Social media hp.com/go/lrblog twitter.com/hploadrunner (@HPLoadrunner) facebook.com/groups/HPLoadRunner linkedin.com/groups/LoadRunner-69884 linkedin.com/groups?gid=4539324 (TruClient) © Copyright 2014 Hewlett-Packard Development Company, L.P.
66
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 66 Forums hp.com/go/lrpc hpln.hp.com/group/community-content-pc-lr hpln.hp.com/group/performance-center-and- loadrunner vivitworldwide.site- ym.com/members/group.aspx?id=117871 © Copyright 2014 Hewlett-Packard Development Company, L.P.
67
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 67 Additional Resources HP LoadRunner page www.hp.com/go/loadrunner Join the buzz! www.hp.com/go.lrblog
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.