问题:
在测试https请求的时候发现无法通过,并且报错
Action.c(31): Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "xxxxxxxx" failed: [10054] Connection reset by peer      [MsgId: MERR-27780]

原因:缺少https证书

解决方案:
1. 得到web网页的.cer证书
2. 借助openssl转换证书的格式为perm
3. loadrunner配置

======================================================
具体:

1. Google浏览器中先得到web网页的.cer证书
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置

Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置

这边选择的格式需要记住,后续需要转换。

选择要保存的路径和文件名,完成.cer证书的导出。


2. openssl 转换证书格式
LR只支持.perm格式的证书,需要借助openssl。

① 下载openssl

官网的openssl貌似是win32的,win64不兼容

有时间也可以自己编译折腾一下(需要安装Perl、VS10、openssl),可以根据以下的教程来做:http://blog.csdn.net/houjixin/article/details/25806151

② 转换
打开cmd,运行openssl
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
中间打了马赛克的就是转换前后证书路径文件,一定要加上路径。

  • 路径不对会如下报错:
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
  • 转换的命令和cer文件的编译格式有关系,如果不对,会报如下错误:
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置

以下是openssl命令的格式:
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置

3. Loadrunner设置证书
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置

https的端口号就固定的443。

Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
Loadrunner 测试https请求配置
设置完成,进行回放,完成!

好气哦,这个图片上传了四次了,我怎么觉得以前没有那么困难呢TAT

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
  • 2021-11-20
  • 2022-12-23
  • 2021-11-01
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2021-03-31
  • 2021-09-07
  • 2021-08-01
  • 2021-06-25
相关资源
相似解决方案