Wednesday, September 12, 2012

HP LoadRunner 11.5 features

                                   On June 5th 2012, HP launched HP ITPS Applications software version 11.5. This 11.5 set of releases focuses on HP Application Lifecycle Management (ALM), HP Performance Center (PC) , HP LoadRunner and HP Sprinter, as well as the new HP lab management automation feature which is supported in both HP ALM 11.5 and HP PC 11.5.(These solutions are available from June 30th, 2012.)

Virtual User Generator (VUGen): a new interface that brings insight

HP LoadRunner 11.50 introduces an innovative VUGen (Virtual User Generator) interface with redesigned IDE and Design Studio. It is now easier than ever to record, replay, and debug scripts using the new VUGen. The improvements include:
•Usability
− It has a modern and intuitive look and feel, flexible panes, and layouts.
− The improved editor is now context-sensitive, supports code completion, and provides enhanced coloring and formatting. It also supports editing features such as highlighting, intelli-type,
watchlist, copy/paste, color coding, etc.
− A true C language debugger has been added.
− The Solution Explorer makes it easier to group multiple scripts, access script items, and perform script-related operations (e.g. comparison). 
− New capabilities are added to search and replace in log and snapshots.
− Step Navigator replaces tree view for single view of the script with easy filtering and search.
− A persistent framework helps maintain a custom look and feel for the script developer.
− Context sensitive help provides needed assistance for the application element that is being used at the time, at the touch of a button (F1).
• New Correlation Studio
The new Correlation Studio hosts all correlation functionality in one place: record-based correlations, replay-based correlations, correlation rules, and correlation from snapshot. Correlations can now be found based on server responses during recording, in many cases eliminating the need to replay iteratively to find dynamic values. It also includes new APIs for locating parameters based on XPath and Regular Expressions. The new Correlation Studio interface and new APIs make scripting easier, faster, and more intuitive.
• Data format extension (DFE) for GoogleWeb Toolkit (GWT) 
The DFE feature is designed to simplify scripting of applications that exchange formatted data; by turning the formatted data into a more readable format the script can be easily correlated and parameterized. GWT DFE is the latest addition to the already supported formats of Base64, JSON, URL Encoding, XML, and Prefix-Postfix. GWT support includes:
− Formatting the GWT RPC data into readable and correlate-able content
− Adding more data (i.e. object field names)
− Enabling simple parameterization
− Solving specific correlations for GWT
• Extensibility
New in version 11.50, users can extend on the functionality of the all-new VUGen IDE itself by developing add-ins that are integrated into the user interface.
• Collaboration
Community sharing allows integration into the HP online community and helps the script developer to be more efficient and productive. Easily access forums, blogs, and Twitter, or add your own search engine to enable access directly from within the development environment.
• Recording 64-bit applications
Support for recording 64-bit applications has been added to the existing support for 64-bit operating systems. These 64-bit applications can usually be recognized when the “*32” suffix is not displayed in the Windows Task Manager for their process (replay is 32-bit based).
IPv6 support
IPv6-based applications can be tested in addition to applications based on IPv4. Support includes IP Spoofing.  Note: internal PC/LR communication (e.g. Controller-Load Generator) is still IPv4 based.

Seven new protocols

• Mobile protocols
New protocols have been added to enable developing scripts for mobile applications. The Mobile Apps protocol (in Web bundle) is used for native applications and Mobile TruClient (RIA bundle) is used for browser-based mobile applications.
• Ajax TruClient for Internet Explorer (IE 9)
This new addition to the Ajax TruClient family expands support to Internet Explorer (IE)-based applications. Applications that work in IE standard mode can be quickly scripted utilizing the same
TruClient technology that has revolutionized scripting for Firefox Web applications.
• Enhancements on TruClient for Firefox
The modern Ajax TruClient Firefox protocol was moved to Firefox 8 providing better performance.  It now supports HTML5 and allows creating functions to easily reuse and share code. Also added were “Think Time” recording, global event handlers to support asynchronous behavior, an API for URL filtering (black and white list), an API for setting HTTP headers, and the ability for automatic transactions per step.
• Web protocol asynchronous support
Support for asynchronous behavior has been added to Web (HTTP/HTML) VUser scripts, and Web-based functions inside Flex, silverlight, and Web Services VUser scripts. This new capability enables recording of poll, long poll, and push interactions required for advanced Web applications that contain various asynchronous communication designed to keep the information current and up to date. These unique communication patterns are recognized automatically and the recorded script is updated accordingly.
• Web Services enhancements
The Web Services protocol includes new features for better security support, improved handling of WCF (Windows Communication Foundation). The Web Services protocol includes the following enhancements: improved UI for security settings including addressing versions, easier certificate selection, flexible definition of signature and encryption algorithms, the option to exclude timestamps, and support of custom extensions to WCF.
• Flex enhancements
New capabilities have been added to better support Flex environment. These new capabilities include:
− Web correlation mechanisms (rules, studio, and response-based correlation, Web correlation APIs)
− Web requests support
− Adobe Flex platform jars bundled in the product so application jars are not needed for message serialization
− RTMP FMS streaming, RTMPT and RTMPS, and GraniteDS support
• .NET4 support
With this release, .NET4 support has been added to the existing support for .NET frameworks 2-3.5.

Extensibility for greater functionality

HP LoadRunner provides best-of-breed extensibility by allowing engineers to include custom code in their scripts and increase their functionality, or use different languages such as JavaScript,Java and VBScript to write custom scripts. Customers can also leverage Microsoft Visual Studio to edit their scripts and take 
advantage of its advanced IDE. HP LoadRunner also provides APIs for integrating load testing into your build management or other automated system. New in version 11.50, users can even extend on the functionality of the all-new HP VUGen IDE itself by developing add-ins that is integrated into the user interface.

 Analysis enhancements

A set of enhancements were added in the analysis, such as:
• New RTMP (real time messaging protocol) Flex Graphics
• TruClient breakdown graphs
• Ability to apply granularity to many graphs
• Global option of absolute/relative time on graphs
Integration with Service Virtualization
HP Service Virtualization helps “virtualize” components, and hence helps remove dependencies. Integrate with HP Service Virtualization and use simulated services to facilitate load testing business
processes that contain services that are not readily available or too costly.
VUGen for HP Business Process Monitoring
For customers that leverage scripts from VUGen to HP Business Service Management (BSM), it is required to record HP Business Process Monitoring (BPM) scripts using VUGen. The following
enhancements were added on Business Process Monitoring:
• Scripts parameterization
Support script parameterization from within BSM script repository to reduce script maintenance overhead.
• Easy script upload
Multiple scripts can now be uploaded into an existing folder in the script repository using drag-and-drop functionality.
A new set of supported environments
• Microsoft Windows Server 2008 R2 SP1
• Windows 7 SP1 (32 and 64 bit)
• Internet Explorer 9

Driving the DevOps trend: HP Lab Management

A challenge that performance testing teams often face is setting up a lab to run the tests. Often times, they are dependent on other teams to set up the lab. There may be stringent process and time requirements that may not be feasible. Infrastructure may not be ready when the build is ready. And build readiness is often unpredictable. These dependencies could become a roadblock, especially when they need to run tests on short notice in an Agile world. Also, if the lab is not set up correctly, this can lead to issues.
HP Lab Management allows testing teams to provision and deploy a test lab themselves in a hybrid delivery environment (bare-metal or virtual, in-house or in the cloud), through HP Performance Center. Leveraging an out-of-the-box integration with HP Continuous Delivery Automation (CDA), users are able to define the infrastructure topology, application configuration, and associated components (middleware, databases, etc.), and then deploy with the appropriate application build as needed. This model-driven approach helps eliminate user errors in lab configuration, thereby making the testing efforts more relevant and accurate.
Testing teams can also schedule tests along with the lab deployment, so that the execution can be kicked off when a new build is ready to be tested. Because the test environment can be provisioned and torn down dynamically, and not left idle, utilization of test infrastructure can also be dramatically improved through HP Lab Management.
HP Lab Management helps bring dev, test, and ops teams closer in a DevOps trend, since the same model can be used across the application lifecycle, whether in dev, test, staging, or production.

Bridging the gap between Development and Operations

HP’s long-standing ability to bridge the gap between performance testing and production performance monitoring has further been enhanced in this release. HP Performance Center now can incorporate actual production performance profiles and data in order to better replicate application behavior when testing.  
Information regarding production usage can now be directly imported from HP Business Service Management (BSM), or from third-party solutions such as Webtrends, to HP Performance Center.
HP Performance Center gives the performance testing team insight into how an application actually is used in production and how it actually performs. This helps create better testing scenarios that reflect real production usage. Based on this insight, they are able to plan and execute performance tests that are more accurate and realistic representations of application performance.
Similarly, HP SiteScope monitoring metrics and configuration can be imported to accelerate setup in testing environment.



Source - Hp.com 
*For more information - Data sheets and white papers: hp.com/go/performancevalidation & hp.com/go/loadrunner
**For HP LoadRunner 11.50 and HP Performance Center 11.50 Tutorials (Technical videos) - http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/HP-LoadRunner-11-50-and-HP-Performance-Center-11-50-Tutorials/ba-p/5687253#.UFIEpbJlSrs

Saturday, July 7, 2012

IP Spoofing in Performance Testing

Do I need IP spoofing? - Yes, if your system uses IP-dependent load balancing

Scenario without IP Spoofing 


                                    The above picture shows how the System Under Test (SUT) is being loaded if we test the application without IP Spoofing. Reason being that all the network elements and the servers have cache and they consider clients IP as the means to route the requests to different tiers, so if we don't have IP Spoofing a LoadGenerator can have only 1 IP and so the path traced by 1 Vuser and the other is the same as seen above as Routers and the Load Balancers will treat that the same user is coming with  a new request.

                                           Scenario with IP Spoofing 




      Performance testing targets are only met if we do the testing the same way as the system is loaded in the real time (same way as shown in the above snapshot) . Every performance test should aim at loading the SUT as shown above and thus highlight the genuine performance bottlenecks.
How do I implement IP spoofing?
1. Run the IP Wizard on each Vuser host machine (Load Generator)
2. Enable the IP Spoofer from the Controller's main menu.

Saturday, June 23, 2012

Rendezvous in LoadRunner

                          You all know the purpose of doing performance testing, but we have some features available with LoadRunner like Rendezvous and IP Spoofing which takes us more close to a real world situations and thus makes our test more valid than ever.
                          In the current topic we shall discuss about how Rendezvous helps us in improving and taking us close to those real world conditions. Lets take an instance of a shopping website which obviously includes some 3rd party sites during checkout eg: Paypal or Google checkout or Credit/Debit card payment etc. During the festival season we expect huge requests from the customers where the site might experience the problems and more importantly issues during the checkout which is major drawback for the shopping site as it decreases its revenue and the customer confidence.
                          So our next step would be to replicate the real world situation for the checkout functionality and to do that, LoadRunner has provided a function called lr_rendezvous() which can do the job for us


In the following example taken from LoadRunner tool doc's, the lr_rendezvous function sets the Meeting rendezvous point. When all users that belong to the Meeting rendezvous arrive at the rendezvous point, they perform do_transaction simultaneously. 

lr_rendezvous("Meeting");
    do_transaction();
/* application dependent transaction */  

                        The lr_rendezvous function creates a rendezvous point in a Vuser script. When this statement is executed, the Vuser program stops and waits for permission from LoadRunner to continue.
This mean that when we are doing the Load test every Vuser will be at different transaction (Vuser 1 is at 3rd transaction and Vuser 2 at 5th transaction etc) and to test business critical transactions (say 6th transaction) then we have to place Rendezvous after 5th transactions so that Vusers wait for all others Vusers to come to that complete 5th transaction and start 6th transaction simultaneously. Thus we can bring out the bottlenecks of that business transaction and could less the performance issues in the production environment. 

Note:- This function can only be used in action section, and not in vuser_init or vuser_end

Thursday, March 29, 2012

Recording a script in VuGen using SAFARI web browser

          We all know that Internet Explorer and Mozilla Firefox are compatible with VuGen for recording Web applications, but only few knew how to record web scripts through Safari browser. Lets see how it can done.
                   
         Similar to the settings we do in VuGen to record web scripts using FireFox we also need similar recording settings for Safari. As seen below we select Application type as Win32 Applications and give the exe file path of Safari in the Program to record entry.
         Once these basic settings are done, you are good to go. Enjoy recording

         If you have any constraint of using specific User Agent (iPad, iPhone etc) for recording which are listed below as Safari can support all these user agents and there might be some applications which are compatible(build for) with specific user agents, VuGen still supports it.
       
      In the recording settings of VuGen, you update the Headers settings under Advanced as shown below
    Once this is done, you can start recording which opens Safari browser where you select the user agent and continue recording the functionality of any application that runs on any of the said user agents.

Saturday, February 11, 2012

Agent less performance monitoring using SNMP

                We have many performance monitoring tools in the market from freeware to licensed. All those tools can be divided as Agent less and Agent based tools.
               Agent based tools are very intuitive in terms of performance monitoring but costly to implement. CA Wily Introscope is the best example for Agent based monitoring. Agents/Probes play a major part in collecting the performance metrics from the systems under test, we have to manually build them but are very intuitive as they collect the metrics from the lowest level possible and it depends on how its configured. This type of monitoring is very useful as you can track each and every request from a module/function/component where the agents are placed. The negative part of it is these configured agents will be an overhead to the system, more are the agents more are the metrics configured and more is the overhead on the system.
               Most of the agent less monitoring tools used SNMP(Simple Network Management Protocol) to track all the performance metrics for the applications. All SNMP compliance systems can be monitored using SNMP. To monitor a system, we have to activate the SNMP service on that system and set all performance metrics to be monitored and the frequency at which it has to monitor. Once these basic settings are done you are ready to go. HP SiteScope is an example of agent less successful monitoring tool.

In brief:-
Agent based monitoring
Pros:-  more intuitive, monitoring at module/function/component level, more metrics can be configured.
Cons:- skill set to configure all agents, overhead on the system.

Agent less monitoring
Pros:- fast to implement, no skill set required, all high level metrics can be monitored.
Cons:- used more network, cannot be customized. metrics are limited