Esempio n. 1
0
Action()
{
	int iDebug;
	
	web_cleanup_cookies( );
		
	lr_start_transaction("_TIVApp_001_My_Test");
	
	lr_save_string("TIVApp_001_001_Homepage", "pTransactionName");
	
	web_reg_find("Fail=NotFound",
		"Search=Body",
		"Text=Test site.",
		LAST);

	web_reg_save_param("cServerName",
	    "LB=Set-Cookie: ROUTEID=.",
	    "RB=;",
	    "Notfound=warning",
	    LAST);
	
	web_reg_save_param("cVersion",
	    "LB=version\">",
	    "RB=<",
	    "Notfound=warning",
	    LAST);
	
	lr_start_transaction(lr_eval_string("{pTransactionName}"));
	
	web_url("Homepage", 
		"URL=http://{pURL}/", 
		"Resource=0", 
		"RecContentType=text/html", 
		"Referer=", 
		"Snapshot=t1.inf", 
		"Mode=HTML", 
		LAST);
	// Log Levels:
	// LR_MSG_CLASS_DISABLE_LOG
	// LR_MSG_CLASS_BRIEF_LOG
	// LR_MSG_CLASS_EXTENDED_LOG
	// LR_MSG_CLASS_RESULT_DATA
	// LR_MSG_CLASS_PARAMETERS
	// LR_MSG_CLASS_FULL_TRACE
	iDebug = lr_get_debug_message();

	lr_output_message("TIVMsg: Msg Level was: %d", iDebug);
	
	lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON);
	
	lr_debug_message(LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_RESULT_DATA,"TIVMsg: %s loaded via server: %s", lr_eval_string("{pTransactionName}"), lr_eval_string("{cServerName}"));
	
	lr_set_debug_message(iDebug, LR_SWITCH_ON);
	
	lr_end_transaction(lr_eval_string("{pTransactionName}"), LR_AUTO);
	
	lr_end_transaction("_TIVApp_001_My_Test", LR_AUTO);
	
	return 0;
}
Esempio n. 2
0
vuser_init(){

	int rc=LR_PASS;

	original_log_option = lr_get_debug_message(); // Save run-time setting as set in script or scenario.
	vi_set_Verbosity_attribute();
	wi_set_unique_id(); // sets global_unique_id base string.
	
	lr_save_string("no imposed impediments","pRunConditions"); // output in logs.

	rc=vi_set_RunType_attribute();
	rc=wi_set_Think_Time();
	rc=vi_set_URLSource_attribute();
	
	return rc;
} // vuser_init()
Esempio n. 3
0
/*! \brief Save the loglevel for later restoration through y_log_restore().
 *
 * This is called by the various y_log_* functions to make sure the loglevel can be put back the way it was.
 *
 *\author Floris Kraak
 */
void y_log_save()
{
    // Save the previous loglevel.
    _y_log_level = lr_get_debug_message();
    //lr_error_message("Saved loglevel %d", _y_log_level);
}