1. Intweb_reg_save_param ("parameter name", "Lb= left Boundary", "rb= right Boundary", last);/registration function, which is used before the parameter value appears, the return value is 0 when the registration succeeds, and the return value of 1 when the registration fails. The left and right boundaries need to be determined according to the Severresponse code of the relevant steps in the TreeView. Use the above function to get the first number that meets the criteria.
2. Web_reg_save_param ("parameter name", "Lb= left Boundary", "rb= right Boundary", "Ord=all", last);/when the argument has multiple values, add "Ord=all" to get all the values. After successful registration, {parameter name _count} represents the number of values obtained, {parameter name _1} is the first value, {parameter name _2} is the second number.
3. Lr_save_string ("String variable", "parameter name")/pass the value in the character variable to the specified parameter. This function is used to change the numeric value of the datafile type parameter.
4. Lr_eval_string ("{parameter name}")/get the numeric value of the parameter. You can obtain a numeric value for a registered or datafile type parameter. Eval is the abbreviation for evaluation (valuation, evaluation, assignment).
5. int sprintf (char * string, const Char*format_string[,args]);/String Assignment function
Action () { int index=56; charfilename[64],*suffix= "TXT"; sprintf (filename, "log_%d.%s", Index,suffix); Lr_output_message ("thenewfilenameis%s", filename); return 0; } Output:Thenewfilenameislog_56.txt |
6. Char*strcat (Char*to,constchar*from);/append a string to the back of another string
7. Web_find ("Find_time", "what=2006-03-0118:21:16.882", last);/Add checkpoints to check whether the string "2006-03-0118:21:16.882" appears on the current page. Find_time the name of the checkpoint for which you entered any.
8. Transaction function
lr_end_sub_transaction/the end of the token child transaction for profiling
lr_end_transaction/Mark LoadRunner End of transaction
lr_end_transaction_instance/marks the end of a transaction instance for profiling
lr_fail_trans_with_error/sets the status of the open transaction to Lr_fail and sends an error message
Lr_get_trans_instance_duration/gets the duration of the transaction instance (specified by its handle)
lr_get_trans_instance_wasted_time/the time wasted by the transaction instance (specified by its handle)
lr_get_transaction_duration/the duration of the transaction (by the name of the transaction)
Lr_get_transaction_think_time/the think time of a transaction by the name of the transaction
Lr_get_transaction_wasted_time/the time that the transaction was wasted (by the name of the transaction)
Lr_resume_transaction/continues to collect transactional data for performance analysis
lr_resume_transaction_instance/continues to collect transaction instance data for performance analysis
lr_set_transaction_instance_status/setting the state of a transaction instance
lr_set_transaction_status/Setting the status of open transactions
lr_set_transaction_status_by_name/set the state of a transaction
lr_start_sub_transaction/marks the start of a child transaction
lr_start_transaction/marks the start of a transaction
lr_start_transaction_instance/starts a nested transaction (specified by the handle of its parent transaction)
lr_stop_transaction/Stop the collection of transaction data
lr_stop_transaction_instance/Stop a transaction (specified by its handle) data collection
lr_wasted_time/eliminates the time wasted on all open transactions
lr_end_sub_transaction/the end of the token child transaction for profiling
r_end_transaction/Mark LoadRunner End of transaction
lr_end_transaction_instance/marks the end of a transaction instance for profiling
lr_fail_trans_with_error/sets the state of the open transaction to Lr_fail and
9. Command line analysis function
lr_get_attrib_double/retrieve a double type variable used in a script command line
lr_get_attrib_long/retrieves a long type variable used in a script command line
lr_get_attrib_string/retrieves the string used in the script command line
10. Informational function
lr_user_data_point/record user-defined data samples
lr_whoami/returns information about the VUser script to the VUser script
lr_get_host_name/returns the host name that executes the VUser script
Lr_get_master_host_name/returns the computer name of the running Loadrunnercontroller