- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Error string length is too long
				
					
						
							Hi All,
 
 The length of the string which i can use in the eval function in Winrunner.
 When i try to execute a function using eval(), i got the error as string length is too long.
 Please help me to use maximum no of length strings in eval.
 
 Thanks,
 Senthilkumar
 
 
 
 
 
 
 
 
 
- 
	
	
		
			
			
				Banned
			
			
			
			
				
					
						  
 
					    
				 
 
			
				
				
				
					Re: Error string length is too long
				
					
						
							Please try these and check out 
 
 FUNCTION:test_process
 # PURPOSE: invokes test calls and manages its execution
 # INPUT PARAM:   test_name - mandatory name of invoked test
 #        table_name - mandatory name of the input data table
 # RETURN VALUE: Returns E_OK or error code
 ##############################################################################
 public function test_process(in script_name, in table_name, in test_case, in order_data_set) {
 auto i, log_text, cwin, row_number, row_content, header_count, header_content,res;
 script_name=substr(script_name,1,index(script_name,"(")-1);
 test_return="";
 if (NoBefore=="") win_save(windows_list_file);          # if windows list is empty, save windows
 
 res=file_open (root_path"\"REGRESSION_TESTS"\"script_name"\script", FO_MODE_READ); # check that file exists
 if(res!=E_OK) {
 my_tl_step("test_process", E_WARNING,script_name" isn't found and invoked");  # if not, log and exit
 return E_ERROR;
 }
 file_close(root_path"\"REGRESSION_TESTS"\"script_name"\script");  # else close file and continue
 
 if (table_name!="") {                      # if data table name was passed
 my_db_connect (IN_DATA_SES,DSN_LOCAL,30);           # get its data
 res=my_db_execute_query (IN_DATA_SES,"SELECT * FROM "table_name" WHERE (Use =Yes AND TestCase = '"test_case"' AND OrderDataSet ='"order_data_set"');",row_number);
 if (row_number==0) {
 my_tl_step("test_process", E_WARNING, script_name" - no data in table '"table_name"' for data set '"test_case"' and OrderDataSet ='"order_data_set"'. Script isn't invoked");
 return E_WARNING;
 }
 db_get_headers (IN_DATA_SES, header_count, header_content);
 }
 else row_number=1;                        # else execute script only once
 
 for (i=0;i     parama["NeedCheck"]=need_check;                # (re)initialize default checking option
 parama["FillEmpty"]=fill_empty;                # (re)initialize default auto-filling option
 parama["Error"]="";                      # clear Error value
 my_tl_step("test_process", E_OK, script_name" is invoked");    # write to log
 if (table_name!="") {                    # if data table name was passed
 db_get_row(IN_DATA_SES,i,row_content);          # get data
 to_array(parama, header_content, row_content, "t",clear_params);
 my_tl_step("test_process", E_OK, "Parameters:"replace_ASCII(row_content,9,59));
 }
 if (parama["Error"]!="") parama["NeedCheck"]="No";      # disable checking of added values for negative test
 already_logged = ABC_Logon(username,password);        # Log On to ABC Instance (avoids logoff after each test execution)
 eval ("test_return=call_close ""script_name"" (parama);");  # invoke test with parameter
 
 win_close_dialogs();                  # close unnecesarry dialogs
 win_restore(windows_list_file);              # restore winows after completed test
 
 log_text=script_name" finished";                # prepare log statement
 if (test_return     if (test_return==E_OK) log_text=log_text&" SUCCESFULLY";
 
 my_tl_step("test_process", test_return, log_text);        # write to the log
 }
 cwin=get_mainwin_desc("ABC");          # get winow description from expected title
 if (cwin!="" && win_exists("ABC")) return E_OK;
 else return test_return;
 }
 
 
 
 
 
 
 
 
 
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				 Posting Permissions
				Posting Permissions
			
			
				
	
		- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-  
Forum Rules