loadrunner 常用函数

本文作为LoadRunner初学者的学习笔记,详细介绍了输出函数、字符串复制函数、连接字符串等关键概念,并通过示例代码进行演示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<span style="font-family: Arial, Helvetica, sans-serif;">以前跟老师学过几天的loadrunner,最近要用了,想要从头来看一下,这个文章就作为我的学习笔记了,哈哈!</span>

lr_output_message(const *char format,exp1,exp2,....expn)	;//输出函数
egg:
	int i=0;
	i++;
	lr_output_message("our i is %d",i);//在屏幕上打出 our i is 1

sprintf( char *string_buffer, const char *format_string[, args] ); //字符串复制函数
egg:
char fileName[64];
int index=20;
* suffix="txt";
sprintf(fileName,"log_%d.%s",index,suffix);<span style="white-space:pre">	</span>//把log_,数字,扩展名组合成文件名,存储到fileName中
lr_out_putmessage("The file name is %s",fileName);<span style="white-space:pre">	</span>//输出 The file name is log_20.txt
itoa(i,num,10);  <span style="white-space:pre">		</span>//i是一个10禁制整形值,这里把i变成10的字符串形式,存储到unm中
<pre name="code" class="cpp">strcat(str1,str2); //把str2连接到str1尾部 
	egg:	char *str1="abcd";
		char *str2="efgh";
             	strcat(str1,str2);
		lr_out_putmessage("str1=%s",str1);    //输出str1=abcdefgh 



</pre><pre>






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值