等到选项 JMeter
Wait until option JMeter
我想知道 JMeter 是否有一个选项,您可以在其中等到某些元素消失。
仅在加载栏完成或不再可见后才进行加载栏示例。 (还可以监控所花的时间长度)
我已经完成了将其编写为 webdriver 测试,然后 运行 它作为 JMeter 中的 Junit 测试,但想知道是否有更简单的解决方案。
欢迎提出任何想法:)
你可以使用Transaction Controller来监控整个过程所花费的时间并等待变化,看看这个:
首先你需要意识到JMeter is not a browser
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
因此 JMeter 不执行任何客户端 JavaScript,实现 "wait until" 选项的唯一方法是使用 While Controller 以便再次重新执行相同的请求并且再次直到响应数据将包含(或停止包含)您要查找的元素。
如果您需要评估客户端 JavaScript,唯一的选择就是使用 Selenium。我建议使用 WebDriver Sampler 而不是使用 JUnit,因为这样您就不必为任何更改重新编译脚本,它将被内联到 .jmx
我想知道 JMeter 是否有一个选项,您可以在其中等到某些元素消失。
仅在加载栏完成或不再可见后才进行加载栏示例。 (还可以监控所花的时间长度)
我已经完成了将其编写为 webdriver 测试,然后 运行 它作为 JMeter 中的 Junit 测试,但想知道是否有更简单的解决方案。
欢迎提出任何想法:)
你可以使用Transaction Controller来监控整个过程所花费的时间并等待变化,看看这个:
首先你需要意识到JMeter is not a browser
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
因此 JMeter 不执行任何客户端 JavaScript,实现 "wait until" 选项的唯一方法是使用 While Controller 以便再次重新执行相同的请求并且再次直到响应数据将包含(或停止包含)您要查找的元素。
如果您需要评估客户端 JavaScript,唯一的选择就是使用 Selenium。我建议使用 WebDriver Sampler 而不是使用 JUnit,因为这样您就不必为任何更改重新编译脚本,它将被内联到 .jmx