Thursday 18 December 2014

LoadRunner – Script Anatomy Description

When you record and save a LoadRunner script in Vugen, there are a number of files that are created. Here’s what they are, and what they do and identification of the files you can safely delete..

Files Required for PlaybackDuring the course of recording and playback of scripts, the Vugen application will create many files, but only some of them are necessary for playback (either in Vugen or the Controller).

For example, say you have script named PerformancEngineer, with two Actions, Home and Forums, then the required files you would need in the PerformanceEngineer script directory would be:

* PerformanceEngineer.usr
* default.usp
* default.cfg
* globals.h
* Home.c
* Forums.c
* vuser_init.c
* vuser_end.c
* PerformanceEngineer.prm

Here’s what is in each file:

PerformanceEngineer.usr: Primarily, the .usr file defines which actions are used by the script. There are other properties which define which protocols are used and other settings, but most of the info
default.usp: Contains the run logic for the script
default.cfg: Contains the run-time settings (except for run-logic)
globals.h: The global headers file- visible and editable in Vugen
*.c (Action files): These are the action files containing your script code. You can edit these files in ny text editor, if you want. Sometimes it is easier than starting up Vugen
PerformanceEngineer.prm: Containes the parameter definitions
*.dat: Your data files, you can save these in the script directory or somewhere else, even a mapped network drive on a different server
Files Created During Vugen Playback

All of the files listed below can safely be deleted and not affect your ability to use the script.

result1: One or more result directories are created which contain script playback results
*.idx: The .idx files are binary “index” files created by Vugen for holding parameter values
PerformanceEngineer.ci:
combined_PerformanceEngineer.c: A list of #includes for all of your Actions
logfile.log, mdrv.log: random log files which you will probably never need to look at
mdrv_cmd.txt, options.txt: These text files contain commands and arguments for the script compiler and driver (mdrv) and are created dynamically, so you can safely delete them.
output.txt: This one is important. This file contains all of the log messages generated during script playback. The contents of this file appear in the “Output Window” section of Vugen
output.bak: A backup of the above file
pre_cci.c: Output from the C pre-processor, which contains all of the functions used in your scrip, from all of the Acitons and header files.

In summary, you can delete: *.txt, *.log, *.idx, *.bak, result*, pre_cci.c, combined_*, *.ci
Files Created During Recording

The ‘data’ directory in your script directory contains the script recording data. I usually delete this so it doesn’t get checked into my version control system, but you may want to keep it around if you use the graphical scripting mode and/or you want to compare playback vs. recording. The auto-correlation feature makes use of this data, too, but I haven’t had much sucess using that feature.

(This has been referred from the site performanceengineer.com)

HP Performance Center 12 and HP LoadRunner 12 protocol bundles

Bundle name Protocols
.NET record/replay Microsoft® ADO.NET
Microsoft .NET 2.0, 3.0, 3.5, and 4.0
Windows® Communication Foundation (WCF)
Database ODBC
Oracle (2-Tier)
DCOM Microsoft COM/DCOM
Developer Unit Test (nUnit, jUnit, and Selenium)
SDK
GUI virtual users HP Functional Testing (HP QuickTest Professional)
Java record/replay Jacada
Java over HTTP Vuser
JMS
Network Domain Name Resolution (DNS)
File Transfer Protocol (FTP)
Internet Message Access Protocol (IMAP)
Lightweight Directory Access Protocol (LDAP)
Microsoft Exchange (MAPI)
Post Office Protocol (POP3)
Simple Mail Transfer Protocol (SMTP)
Tuxedo
Windows Sockets
CORBA—Java
RMI—Java (includes ORMI)
Oracle E-Business Oracle NCA
Oracle Web Applications 11i (Click and Script)
PeopleSoft Enterprise (Click and Script)
PeopleSoft—Tuxedo
Siebel—Web
Web (HTTP/HTML)
Remote access Citrix Virtual User (ICA)
Remote Terminal Emulation (RTE)
Remote desktop Microsoft Remote Desktop Protocol (RDP)
Protocol available for HP LoadRunner only.Share with colleagues Rate this document
Sign up for updates
hp.com/go/getupdated
Data sheet |
 Rich Internet applications Action Message Format (includes RTMP/AMF)
AJAX Click and Script
AJAX TruClient—Firefox
AJAX TruClient—IE
Flex Virtual User (for Adobe® Flash)
Silverlight Vuser
Mobile TruClient
SAP SAP Click and Script
SAP GUI
SAP—Web
SAP Mobile Platform (SMP)
SOA MQSeries—Client
MQSeries—Server
Service Test Vuser
Web Services
Templates2 C Vuser
C#.NET Vuser (Visual Studio add-in)
C++.NET Vuser (Visual Studio add-in)
Enterprise Java Beans (EJB)
Java Vuser
JavaScript Vuser
VBScript Vuser
VB.NET Vuser (Visual Studio add-in)
VBNet Vuser
Web 2.0 Web and multimedia, RIA and SOA (combined)
Web and multimedia Media Player (MMS)
Real (RealPlayer)
Web (Click and Script)
Web (HTTP/HTML)
Mobile Applications Protocol
Wireless Multimedia Messaging Service (MMS)
WAP

"The requested operation cannot be completed because the Terminal connection is currently busy processing a connect operation" Error solved

This is the issue where a user has disconnected from a remote server instead logging off, taking up one of the Remote Desktop sessions.Then we will get the error "The terminal server has exceeded the maximum number of allowed connections".This can be easily corrected by logging into the server in console mode and manually logging off the user.

Whenever we try to connect for first time it will show the same error this is because the user was disconnected from the remote machine instead of logoff.vSo for this the user need to login to the system and log off the session that he opened previously.You can use the below commands to kill the user in remote machine. 



c:\>sc \\THESERVERNAME query TermService


SERVICE NAME: TermService

DISPLAY_NAME: Terminal Services
TYPE               : 20  WIN32_SHARE_PROCESS
STATE              : 4  RUNNING(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0

The Terminal Services was running, it can't be restarted on Server 2003 so we can take a look att the running processes:

C:\>tasklist /s MYSERVERNAME /u MYUSERNAME /p MYPASSWORD
(Output truncated to highlight relevant processes)

Image Name PID Session Name Session# Mem Usage

Image Name           PID      Session Name   Session#  Mem Usage

==================== ======== ============== ========= ============

System Idle Process  0                       0                 28 K

csrss.exe            4140     Console        7              2,684 K

winlogon.exe         4220     Console        7              5,840 K

logon.scr            4500     Console        7              1,580 K

Looking at the processes above, I recalled an issue that could sometimes arise with the logon.scr process on Virtual Machines.

Thinking that logon.scr (Process ID 4500) may be the culprit, I decided try killing the process:

C:\>taskkill /s MYSERVERNAME /u MYUSERNAME /p MYPASSWORD /PID 4500 SUCCESS: The process with PID 4500 has been terminated.

After seeing that the process was successfully killed, I tried logging in again and could do so successfully!

Wednesday 17 December 2014

How to run Ajax Click n Script in Controller?

AJAX (Asynchronous JavaScript and XML) is a technique for creating interactive Web applications. With AJAX, Web pages exchange small packets of data with the server, instead of reloading an entire page. This reduces the amount of time that a user needs to wait when requesting data. It also increases the interactive capabilities and enhances the usability.
Using AJAX, developers can create fast Web pages using Javascript and asynchronous server requests. The requests can originate from user actions,timer events, or other predefined triggers.AJAX components, also known as AJAX controls, are GUI based controls that use the AJAX technique—they send a request to the server when trigger occurs.

For example, a popular AJAX control is a Reorder List control that lets you drag components to a desired position in a list. VuGen’s support for AJAX implementation is based on Microsoft’s ASP.NET AJAX Control Toolkit formerly known as Atlas.

AJAX Supported Frameworks

The supported frameworks for AJAX functions are:
Atlas 1.0.10920.0/ASP.NET AJAX—All controls
 Scriptaculous 1.8—Autocomplete, Reorder List, and Slider

VuGen supports the following frameworks at the engine level. This implies
that VuGen will create standard Web Click and Script steps, but not AJAX
specific functions:
 Prototype 1.6
 Google Web Toolkit (GWT) 1.4

AJAX Example Script

VuGen uses the control handler layer to create the effect of an operation on a GUI control. During recording, when encountering one of the supported AJAX controls, VuGen generates a function with an ajax_xxx prefix. In the following example, a user selected item number 1 (index=1) in an
Accordion control. VuGen generated an ajax_accordion function.

Note: When you record an AJAX session, VuGen generates standard Web (Click and Script) functions for objects that are not one of the supported AJAX controls. In the example above, the word FILE_PATH was typed into an edit box.

web_browser("Accordion.aspx",

DESCRIPTION,
ACTION,
"Navigate=http://labm1app08/AJAX/Accordion/Accordion.aspx",
LAST);
lr_think_time(5);
ajax_accordion("Accordion",
DESCRIPTION,
"Framework=atlas",
"ID=ctl00_SampleContent_MyAccordion",
ACTION,
"UserAction=SelectIndex",
"Index=1",
LAST);
web_edit_field("free_text_2",
"Snapshot=t18.inf",
DESCRIPTION,
"Type=text",
"Name=free_text",
ACTION,
"SetValue=FILE_PATH",
LAST);
  

Note: When you record an AJAX session, VuGen generates standard Web (Click and Script) functions for objects that are not one of the supported AJAX controls. In the example above, the word FILE_PATH was typed into an edit box.

Thursday 4 December 2014

HTTP WATCH

Why do you need an HTTP Viewer or Sniffer?
All web applications make extensive use of the HTTP protocol (or HTTPS for secure sites). Even simple web pages require the use of multiple HTTP requests to download HTML, graphics and javascript. The ability to view the HTTP interaction between the browser and web site is crucial to these areas of web development:
  • Trouble shooting
  • Performance tuning
  • Verifying that a site is secure and does not expose sensitive information
How can HttpWatch Help?
HttpWatch integrates with Internet Explorer and Firefox browsers to show you exactly what HTTP traffic is triggered when you access a web page. If you access a site that uses secure HTTPS connections, HttpWatch automatically displays the decrypted form of the network traffic.

Conventional network monitoring tools just display low level data captured from the network. In contrast, HttpWatch has been optimized for displaying HTTP traffic and allows you to quickly see the values of headers, cookies, query strings .

HttpWatch also supports non-interactive examination of HTTP data. When log files are saved, a complete record of the HTTP traffic is saved in a compact file. You can even examine log files that your customers and suppliers have recorded using the free Basic Edition.
Why HttpWatch?

Seven reasons to use HttpWatch rather than other HTTP monitoring tools:
  1. Easy to Use - start logging after just a couple of mouse clicks in Internet Explorer or Firefox. No other proxies, debuggers or network sniffers have to be configured
  2. Productive - quickly see cookies, headers, POST data and query strings without having to manually decode raw HTTP packets
  3. Robust - reliably log thousands of HTTP transactions for hours or days while tracking down intermittent problems
  4. Accurate - HttpWatch has minimal impact on the normal interaction of the browser with a web site. No extra network hops are added, allowing you to measure real world HTTP performance
  5. Flexible - HttpWatch only requires client-side installation and will work with any server side technology that renders HTML pages in Internet Explorer or Firefox. No special server-side permissions or configurations are required - ideal for use against production servers on the Internet or Intranet
  6. Comprehensive - works with HTTP compression, redirection, SSL encryption & NTLM authentication. A complete automation interface provides access to recorded data and allows HttpWatch to be controlled from most popular programming languages.
  7. Professional Support - updates and bug fixes are provided free of charge on our website and technical support is available by email, phone or fax.

Uses of HttpWatch:
  1. Testing a web application to ensure that it is correctly issuing or setting headers that control page expiration
  2. Finding out how other sites work and how they implement certain features
  3. Checking the information that the browser is supplying when you visit a site
  4. Verifying that a secure web site is not issuing sensitive data in cookies or headers
  5. Tuning the performance of a web site by measuring download times, caching or the number of network round trips
  6. Learning about how HTTP works (useful for programming and web design classes)
  7. Alowing webmasters to fine tune the caching of images and other content
  8. Performing regression testing on production servers to verify performance and correct behavior

What is a HAR File and what is the use of HAR??

HAR stands for HTTP Archive. 

This is a common format for recording HTTP tracing information. This file contains a variety of information, but for our purposes, it has a record of each object being loaded by a browser. Each of these objects’ timings is recorded.

The HAR file format is still an evolving standard, and the information contained within is both flexible and extensible. You should expect the HAR file to include a breakdown of timings including:
  • how long it takes to fetch the DNS information
  • how long each object takes to be requested
  • how long it takes to connect to the server
  • how long it takes to transfer from the server to the browser of each object
  • whether the object is blocked or not
The data is stored as a JSON document and extracting meaning from the low level data is not always easy, but with practice, a HAR file can quickly help you identify the key performance problems with a web page, which in turn will help you efficiently target your development towards the areas that will deliver the greatest return on your efforts.