Loadrunder脚本篇——Running Time setting之Additional attributes

作用说明

为Vuser脚本提供额外自定义参数。额外参数设置可应用于所有Vuser脚本类型。

 

 



说明:

Add:添加一个参数

Remove:移除一个参数

 

可以在这里先输入一些常用的参数名及对应的值,类似常量,可以通过lr_get_attrib_string()函数来获取这些参数名对应的值,如下

示例:

Action2()

{  

    lr_error_message(lr_get_attrib_string("test"));

    return 0;

}

 

运行结果:

loadrunner <wbr>运行脚本-Run-time <wbr>Settings->General->Additional <wbr>attributes设置

 

说明:

lr_error_message()函数:类似lr_output_message(),将函数中的字符输出到日志,但是lr_error_message()函数会产生错误信息,这个错误会在后面影响错误计数器。(尽量避免使用)

posted @ 2018-01-25 15:31  残~枫~  阅读(238)  评论(0编辑  收藏  举报