HP LoadRunner VuGen Questions Bank: Q. 31 to 40
Learn “VuGen” Module of HP LoadRunner through FAQs:
Q. 31: How do we select the best possible Scripting Language while recording?
While we begin a recording session, VuGen automatically creates a script which emulates our actions by default.
Various script generation languages used by VuGen are:
1) For MS .NET the default language is C or C# .
2) For the FTP, COM/DCOM, and mail protocols (IMAP, POP3, and SMTP): Visual Basic, VB Script, and Javascript.
Following languages are best suited for the respective applications:
1) C Language: For recording applications that use complex COM constructs and C++ objects.
2) C # Language:
For recording applications that use complex applications and environments under MS .NET protocol only.3) Visual Basic .NET Language: For VB .NET applications, using the full capabilities of VB.
4) Visual Basic for Applications: For VB-based applications, using the full capabilities of VB.
5) Visual Basic Scripting: For VBscript-based applications, such as ASP.
6) Java Scripting: For Javascript-based applications such as js files and dynamic HTML applications.
<<<<<< =================== >>>>>>
Q. 32: How can we can map the network traffic from a specific server while recording Vuser scripts?
While recording Vuser scripts which record network traffic on a socket level like -HTTP, SMTP, POP3, FTP, IMAP, Oracle NCA and WinSocket, we can set the Port Mapping options.
With such options, we can map the traffic from a particular server by defining the port combination to the desired communication protocol.
Mapping is created by specifying a server name, port number, or a complete server – port combination. Few examples are:
1) Specify that all the traffic from the server ABC on port 25, should be handled as SMTP.
2) Specify that all traffic from the server called XYZ should be mapped to the FTP protocol, regardless of the port.
3) Specify to map all traffic on port 23 to SMTP, regardless of the server name.
<<<<<< =================== >>>>>>
Q. 33: What is Forced Mapping?
If we specify a mapping for a port number, server name, or combination server – port, VuGen forces the network traffic to use that service.
For example, if we were to specify server on port 80 to use FTP, VuGen uses the FTP protocol to record that communication, even though the actual communication may be HTTP. In this instance, the Vuser script might be empty.
<<<<<< =================== >>>>>>
Q. 34: What is Traffic Forwarding & when do we use it?
Traffic Forwarding refers to the process of forwarding all traffic from a specific port to another server. This is useful in situations where VuGen cannot run properly on the client, such as unique UNIX machines, or instances where it is impossible to launch the application server through VuGen.
An option “Allow forwarding to target server from local port” is available wherein we configure VuGen to intercept the traffic from the problematic client machine, and pass it on to the server. Thus VuGen is able to process the data and generate code for the actions.
<<<<<< =================== >>>>>>
Q. 35: What type of enhancements are done to the Vuser Scripts?
We can enhance a Vuser script :
1) By adding General Vuser functions
2) By adding Protocol-Specific Vuser functions
3) By adding Standard ANSI C functions.
We can enhance the Vuser script either during the recording or after the recording.
<<<<<< =================== >>>>>>
Q. 36: What is the utility of General Vuser Functions in Vuser Scripts?
General Vuser functions are added to any Vuser scripts to enhance its functionality. For example, we can use General Vuser functions to measure the server performance, control server load, add debugging code, or to retrieve the run-time information about the Vusers participating in the test.
Some of the General Vuser functions are generated by VuGen and are inserted into the Vuser script during recording.
General Vuser functions can be used in any type of Vuser script. All General Vuser functions have an LR prefix.
<<<<<< =================== >>>>>>
Q. 37: What is the utility of Protocol-Specific Functions in Vuser Scripts?
The aim of having Protocol-Specific Functions is also to enhance the Vuser scripts. Many libraries of special functions are available for use.
We have libraries of functions specific to a particular type of Vuser. For example, we use the LRS functions in a Windows Sockets Vuser script and LRT functions in a Tuxedo Vuser script.
<<<<<< =================== >>>>>>
Q. 38: What is the utility of Standard ANSI C Functions in Vuser Scripts?
The aim of having Standard ANSI C Functions is also to enhance the Vuser scripts.
ANSI C functions allow us to add comments, control flow statements, conditional statements etc. to the Vuser scripts. we can add standard ANSI C functions to any type of Vuser script.
<<<<<< =================== >>>>>>
Q. 39: What is the purpose of transactions in Vuser Scripts?
Transactions are defined to measure the performance of the server. Every transaction measures the time it takes for the server to respond to specified Vuser requests. These requests can be simple tasks like waiting for a response for a single query, or complex tasks like submitting several queries and generating a report.
We insert Vuser functions in the Vuser scripts to mark the beginning and the end of a task for measuring a transaction.
We can mark any number of transactions in a script, and each transaction can be specified with a different name.
The transactions can be created during the recording as well after the recording by using transaction editor.
<<<<<< =================== >>>>>>
Q. 40: What steps are needed to create a transaction to measure a business process?
Before creating a script, we need to decide on the business processes we want to measure. Next step is to mark every business process or sub-process as a transaction.
Transaction creation has two basic steps.
1) Marking the start of the transaction
2) Marking the end of the transaction
We can create nested transactions that is creating transactions within transactions.
Continue to Next Part : Q 41 to 50
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.