![]() ![]() ![]() ![]() |
| Topics this page:
|
|
| Ways to Script
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
#ifndef _GLOBALS_H #define _GLOBALS_H //-------------------------- // Include Files #include "lrun.h" #include "web_api.h" #include "lrw_custom_body.h" // recorded for web_custom_request functions. //-------------------------- // Global Variables #endif // _GLOBALS_H For the COM/DCOM protocol (making calls to COM API functions and interface methods)
| ![]() ![]() ![]() |
LoadRunner recognizes syntax defined for the ANSI C programming language
with NO Microsoft extensions.
The minimum for any action block is:
|
| ![]() ![]() ![]() |
When VuGen compiles a script, it creates a file named "pre_cci.ci"
which contains code from all actions and include files.
This is why syntax errors refer to "not writing pre_cci.ci".
| Yuriy Veytsman of IBM Lotus uses ![]() ![]() The lrun.h file defines several constants that you can use in your script:
LR_PASS and PASS = 0
| ![]() ![]() ![]() |
LoadRunner uses | ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
Runtime Settings GUI | First parameter: lrun.h constants | Second parameter |
---|---|---|
Enable logging | - | 0 or LR_MSG_CLASS_DISABLE_LOG |
A. Send messages only when an error occurs | 512 or LR_MSG_CLASS_JIT_LOG_ON_ERROR | 1 or LR_SWITCH_ON |
B. Always send messages | 0 or LR_SWITCH_OFF | |
a. Standard log | 1 or LR_MSG_CLASS_BRIEF_LOG | 1 or LR_MSG_ON |
b. Extended log | 16 or LR_MSG_CLASS_EXTENDED_LOG | |
Parameter substitution | 4 or LR_MSG_CLASS_PARAMETERS | |
Data returned by server | 2 or LR_MSG_CLASS_RESULT_DATA | |
Advanced trace![]() | 8 or LR_MSG_CLASS_FULL_TRACE |
LR_SWITCH_OFF is a constant for value zero. LR_SWITCH_ON is value 1.
"Enable logging" is assumed to have been checked when the message level has either the 1 or 16 bit set on.
"30" is the same as this script:
The | operator between constants is a logical OR which combines the binary value of constants associated with LR_MSG_CLASS_EXTENDED_LOG.
Internally, specifying all extended log subtypes would result in a value of 30 ( 16 + 4 + 2 + 8 ),
as described in this table rationalizing the GUI Run-time Settings dialog box hierarchy of radio buttons and optional check boxes controlling output,
to the binary bits within its "message level" variable.
| ![]() The Scenario ID is not available either as a type of parameter like VuserID, Iteration, etc. | ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
Microsoft, UserLand, and DevelopMentor created SOAP (Simple Object Access Protocol) from 1998 to the SOAP 1.1 W3C note 8, May 2000. "XML-based information which can be used for exchanging structured and typed information between peers in a decentralized, distributed environment." is the definition of SOAP V1.2 which reached W3C Recommendation 24 June 2003.
|
If you're still on LR 7.8, to capture SOAP web services calls and to scan for WSDL 1.1 files, install the 7.8 Feature Pack 1 (which installs MSSOAP Toolkit 3.0) and buy a Mercury Web Services add-in license, which provides an XML viewer and SOAP listener that complies with WS-I basic profile 1.1.
LoadRunner's WSDL parser creates web_service_call functions with a UI tool instead of recording. LRXML is an essential API of the protocol.
I've had problems with soap_request function because its argument are passed through the XML parser. So I prefer using the web_custom_request function because it is not passed through the XML parser. Here is an example of a SOAP call to a Windows .NET web service using the ISO-8859-1 character set:
web_remove_auto_header("Accept-Encoding", LAST); web_add_header("User-Agent", "NuSOAP/0.6.7 (1.75)"); web_add_header("Content-Type", "text/xml; charset=ISO-8859-1"); web_add_header("SOAPAction", "\"http://mmm.com/a\"" ); web_custom_request("Auth_request", "URL=http://x.com/y/z.asmx", "Method=POST", "TargetFrame=", "Resource=0", "Referer=", "Body=<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" "<SOAP-ENV:Envelope " "xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" " "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " "xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" " "xmlns:si=\"http://soapinterop.org/xsd\" " "xmlns:nu=\"http://testuri.com\">" "<SOAP-ENV:Header>" "</SOAP-ENV:Header>" "<SOAP-ENV:Body>" ... "</SOAP-ENV:Body>" "</SOAP-ENV:Envelope>", LAST);"<SOAP-ENV:Envelope " can also be coded "<soap:Envelope ".
Note that quotes must be made into escape characters.
For my customers I have a web page that scans a WSDL
and creates LoadRunner web_custom_request function calls with escape characters.
The code above should generate this HTTP header:
POST /y/z.asmx HTTP/1.1\r\n Content-Type: text/xml; charset=ISO-8859-1\r\n Cache-Control: no-cache\r\n User-Agent: NuSOAP/0.6.7 (1.75)\r\n SOAPAction: "http://x.com/a"\r\n Accept: */*\r\n Connection: Keep-Alive\r\n Host: x.com\r\n Content-Length: 1820\r\n
NOTE: SOAPACTION is unique to Microsoft, which assumes http://tempuri.org as the namespace.
MSDN articles on messaging protocols
| ![]() ![]() ![]() |
Date and Time data can be handy to create unique data automatically.
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
Protocol | Runtime Setting | Default Value | Max. Value | Script override function |
---|---|---|---|---|
For Web Scripts: | DNS caching | Yes | - | |
Keep-alive HTTP connections | Yes | - | web_disable_keep_alive (); web_enable_keep_alive (); | |
HTTP-request connect timeout (sec) | 120 | 1000 | web_set_timeout( CONNECT, "120"); | |
HTTP-request receive timeout (sec) | 120 | 1000 | web_set_timeout( RECEIVE, "180"); | |
Step download timeout (sec) | 120 | 32000 | web_set_timeout( STEP, "240"); | |
For Winsocket: | - | lrs_set_recv_timeout |
To customize the ThinkTime parameter, use the lr_get_attribute_long or _double function to pull in the command line parameter into a script.
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
Type=Multi AdditionalTypes=WebJS ActiveTypes=WebJS GenerateTypes=WebJS RecordedProtocols=WebJS MajorVersion=8 MinorVersion=1 LastModifyVer=8.1.4.0
Related Topics:
Performance Testing
NT Perfmon / UNIX rstatd Counters
Mercury LoadRunner
Mercury Virtual Table Server (VTS)
Mercury WinRunner
Rational Robot
Free Training!
Tech Support
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |