使用Jmeter 5.0测试基于桌面的应用程序时出现HTTP Sampler设置错误

时间:2018-09-27 08:04:17

标签: jmeter desktop recording

enter image description here

使用Jmeter对基于桌面的应用程序(Ms word 2016中的加载项)进行性能测试所执行的步骤: 1)文件->模板->创建 2)Https测试脚本记录器->端口号8888 3)将桌面的代理设置端口号更改为8888 4)单击jmeter中的开始按钮。 5)收到此消息,如屏幕截图所示。 6)打开word文件,然后开始单击功能区。 jmeter中没有任何记录。

1 个答案:

答案 0 :(得分:0)

根据JMeter 5.0 release notes

  

记录功能已得到改进,以提供在浏览器中导航时始终位于顶部的弹出窗口,允许您在应用程序中导航时命名交易。

JMeter 5.0 release notes

因此绝对可以预期弹出窗口。


您无法实际记录的事实令人沮丧,您可能需要采取以下一些故障排除步骤:

  1. 如果加载项使用其他传输方式,JMeter仅能记录HTTP和HTTPS协议-您将无法记录流量。 c
  2. 要记录HTTPS请求,您需要将JMeter的自签名证书安装到操作系统受信任的存储中。鉴于您已经提到了MS Word加载项,我假设您使用的是Windows,因此请确保将document.addEventListener('DOMContentLoaded', function() { // When the event DOMContentLoaded occurs, it is safe to access the DOM // When the user scrolls the page, execute myFunction window.addEventListener('scroll', myFunctionForSticky); // Get the navbar var navbar = document.getElementById("myTopnav"); // Get the offset position of the navbar var sticky = navbar.offsetTop; // Add the sticky class to the navbar when you reach its scroll position. // Remove "sticky" when you leave the scroll position function myFunctionForSticky() { if (window.pageYOffset >= sticky) { console.log("window.pageYOffset >= sticky"); } else { console.log("Not window.pageYOffset >= sticky"); } if (window.pageYOffset >= sticky) { navbar.classList.add("sticky"); } else { navbar.classList.remove("sticky"); } } /*Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon*/ function myFunctionForResponsive() { navbar.classList.toggle('responsive'); } }) 文件导入到Windows Certificate Management tool中。另请参见HTTP(S) Test Script Recorder文章的 HTTPS记录和证书一章,以详细了解MITM代理的概念。

    JMeter Desktop Apps Certificate Manager

  3. 您可能需要set system-wide proxy via netsh command,以便您的加载项可以接起

    JMeter WinHTTP Proxy for Desktop Apps

如果需要,请查看How to Run Performance Tests of Desktop Applications Using JMeter文章,以详细了解上述技术。

相关问题