解決方案一:
備注:
此方案如果請求響應時間太長,勾選“WinInet replay instead of Sockets(Windows only)”將會導致如下錯誤:
即使此時修改如下參數也不會生效:
WinInet replay instead of Sockets(Windows only)勾選后,請求超過20s將會報27492的錯誤
網站回訪報如下錯誤:
Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer [MsgId: MERR-27780]
解決方案:
vuser ->run-time settings ->preferences ->勾上WinInet replay instead of Sockets(Windows only)
再次回放,腳本回放成功
原理:
vugen user's guide 提到 :
Advanced Web run-time options WinInet Replay (instead of Sockets): Instructs VuGen to use the WinInet replay engine. VuGen has two HTTP replay engines: Sockets-based (default) or WinInet based. The WinInet is the engine used by Internet Explorer and it supports all of the features incorporated into the IE browser. The limitations of the WinInet replay engine are that it is not scalable, nor does it support UNIX. In addition, when working with threads, the WinInet engine does not accurately emulate the modem speed and number of connections.
VuGen's proprietary sockets-based replay is a lighter engine that is scalable for load testing. It is also accurate when working with threads. The limitation of the sockets-based engine is that it does not support SOCKS proxy. If you are recording in that type of environment, use the WinInet replay engine.
從上可知,winInet replay 支持集成如IE的所有特征。回放時,底層的winInet函數完成SSL握手過程。同時每種mode均有優劣。
文章摘自:http://www.ithao123.cn/content-10377664.html
解決方案二:
在報錯的鏈接前面加上如下代碼:
再次回放問題得到解決,而且同時能夠解決請求應答時間超過20s的請求
解決方案二的原文來自:https://community.hpe.com/t5/LoadRunner-Practitioners-Forum/GENERAL-MSG-CAT-SSL-ERROR-Connection-failed-to-host-during/td-p/6202935