HP LoadRunner VuGen Questions Bank: Q. 81 to 90
Learn “VuGen” Module of HP LoadRunner through FAQs:
Q. 81: How do we manage Vuser Scripts created in VuGen?
VuGen works seamlessly with HP Quality Center, which is a Web-based test management tool. With Quality Center we can efficiently store and retrieve the Vuser scripts, scenarios and results.
Scripts are stored in a Quality Center project and can be organized into unique groups. When VuGen is connected to a Quality Center project, we can create new scripts in VuGen and save them directly to our project.
<<<<<< =================== >>>>>>
Q. 82: How do we manage Scripts with HP Performance Center?
VuGen provides integration with HP – Performance
Center, which is a Web-enabled global load testing tool providing facility to test our system from different geographical locations.Through the user interface of VuGen we can upload and download scripts to and from Performance Center . The scripts are uploaded to the Performance Center to add them to the Vuser Scripts list and for use later our test. The scripts can be downloaded for editing and saving them locally.
VuGen can access a Performance Center project, after a connection is established with the Web server on which Performance Center is installed.
<<<<<< =================== >>>>>>
Q. 83: How can we create Vuser script through programming?
We can create a Vuser script through programming within the Visual C and Visual Basic environments. We can develop our Vuser script within our development application, while importing the Vuser API libraries.
We can program a Vuser script from within the VuGen editor while incorporating all our libraries or classes of the application.
We use a VuGen template for creating a Vuser script through programming, which forms the basis for a larger Vuser script.
<<<<<< =================== >>>>>>
Q. 84: How do we create XML script using VuGen?
VuGen allows us to dynamically work with XML code and retrieve the values during test execution.
Steps for creating XML script are:
1) Record a script in the desired protocol, usually Web, Web Services, or Wireless.
2) Copy the XML structures into the script.
3) Add XML functions from the LR API in order to retrieve dynamic data and the XML element values.
<<<<<< =================== >>>>>>
Q. 85: How many functions are available in VuGen for writing values to an XML tree?
We can write values to an XML tree using following five functions:
1) lr_xml_delete : For deleting fragments from an XML string.
2) lr_xml_insert : For inserting a new XML fragment into an XML string.
3) lr_xml_replace : For replacing fragments of an XML string.
4) lr_xml_set_values : For setting the values of XML elements found by a query.
5) lr_xml_transform : For applying Extensible Stylesheet Language (XSL) transformation to XML data.
<<<<<< =================== >>>>>>
Q. 86: How can we use VuGen as a General Debugging tool?
VuGen can be used as a regular text editor. We can open any text file in it and edit it.
When an error message comes up during replay in the output window, we can double click on it and VuGen jumps the cursor to the line of the test that caused the problem.
We can place the cursor on the error code and press F1 to view the online help explanation for the error code.
<<<<<< =================== >>>>>>
Q. 87: Why a data driven two tier database script fails, while it works fine with the same values in the application?
The failure can be due to presence of trailing spaces in our data values.
Even though we type the data values directly into the GUI, there is a probability of data getting truncated. Hence we should manually eliminate the trailing spaces from the data file. Tab -delimited files can hide trailing spaces and can cause problems. Hence comma-delimited files are the most recommended ones. However It is suggested to view the files in Excel to confirm their correctness before hand.
<<<<<< =================== >>>>>>
Q. 88: How can we create Vuser scripts for running on UNIX platforms?
We can create Vuser scripts which can run on UNIX platforms by following two methods:
1) By using VuGen: We record our application in a Windows environment and run it in UNIX, because recording is not supported on UNIX.
2) By Programming: Scripts can be programmed in C or C++ and they must be compiled into a dynamic library. To create a script through programming, we can use a Vuser template as a basis for a larger Vuser scrips.
<<<<<< =================== >>>>>>
Q. 89: How do we use VuGen to create test scripts for testing SOA environment?
We can use a test generation wizard in VuGen to automatically generate scripts, or create the scripts manually.
To automatically generate test scripts, we use the SOA Test Generator. A wizard guides us through the process of selecting testing aspects such as interoperability with different toolkits, boundary testing, and standard compliance.
<<<<<< =================== >>>>>>
Q. 90: What type of manual scripts can be created by using VuGen under SOA environment?
For manual scripts, we use VuGen to create following types of scripts.
1) Single Protocol Script: A script that emulates SOAP traffic by sending SOAP requests to the Web service.
2) Multi Protocol Script: A script that emulates several protocols in a single script. For example, if our environment contains a client accessing Web Services and Web pages, choose both the Web Services and Web protocols.
Continue to Next Part : Q 91 to 100
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.