loadrunner脚本乱码汉化后出现乱码,求大神

5662人阅读
项目压力测试
最近进行项目压力测试,选择用loadrunner来进行测试,当在回放时间,脚本中的中文由乱码,经研究,经过一下3步可以解决,分享一下
第一步:当在进行新建脚本时间,选择选项中-〉高级-〉选择“支持字符集”-〉UTF-8
第二步:在loadrunner的generator界面的工具-〉录制选项-〉HTTP属性-〉高级中的UTF-8打对勾
第三步:在脚本回放之前设置:F4打开运行时设置界面-〉浏览器-〉更改-〉使用浏览器-〉最后一项语言选择“中文(中国)”。
经过以上3步,可以正常的显示优美的中文了
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:291673次
积分:3132
积分:3132
排名:第11007名
原创:70篇
转载:17篇
评论:71条
(2)(1)(1)(1)(2)(3)(1)(2)(2)(1)(2)(1)(1)(1)(2)(1)(1)(2)(1)(2)(2)(1)(4)(1)(1)(1)(2)(3)(6)(11)(1)(3)(22)关注51Testing
LoadRunner显示中文乱码的问题
发表于: 12:45 &作者:帅胡 & 来源:51Testing软件测试网采编
推荐标签:
lr_convert_string_encodingConverts a string to a different encoding.Return Values:This function returns 0 on success and -1 on failure.C Languageint lr_convert_string_encoding( const char *sourceString, const char *fromEncoding, const char *toEncoding, const char *paramName);sourceString The string to convertfromEncoding The encoding of the sourceStringtoEncoding The encoding to convert of the string saved in parameter paramNameparamName The name of the parameter in which the destination string will be savedlr_convert_string_encoding converts a string encoding between the following encodings: System locale, Unicode, and UTF-8. The function saves the result string, including its terminating NULL, in the parameter paramName.Printable characters in the result string are displayed in VuGen and its logs as the actual characters. Non-printable characters are displayed in Hexadecimal. For example:rc = lr_convert_string_encoding("A", NULL, LR_ENC_UTF8, "stringInUnicode");The result string displays as A\x00, and not \x41\x00, because the letter A is a printable character.Add lr_convert_string_encoding manually to a script when needed. It is not recorded.Possible values for 'fromEncoding' and 'toEncoding' :Constant ValueLR_ENC_SYSTEM_LOCALE NULLLR_ENC_UTF8 "utf-8"LR_ENC_UNICODE "ucs-2"rc = lr_convert_string_encoding(lr_eval_string("{buy_result}"), LR_ENC_UTF8, LR_ENC_SYSTEM_LOCALE, "stringInUnicode");  1.rc是返回值,为0表示转换成功,为-1表示失败  2.lr_eval_string("{buy_result}")待转换的字符  3.LR_ENC_UTF8待转换字符的初始编码格式  4.LR_ENC_SYSTEM_LOCALE需要把待转换字符转换成的格式,一般是转换为本地的默认格式  5."stringInUnicode"存储转换后字符串的变量名称。
搜索风云榜
51Testing官方微信
51Testing官方微博
测试知识全知道拒绝访问 | www.1398.org | 百度云加速
请打开cookies.
此网站 (www.1398.org) 的管理员禁止了您的访问。原因是您的访问包含了非浏览器特征(391c9ccc07aa6628-ua98).
重新安装浏览器,或使用别的浏览器you have been blocked

我要回帖

更多关于 loadrunner回放乱码 的文章

 

随机推荐