【发布时间】:2015-04-30 15:49:35
【问题描述】:
我正在我们的网站上进行负载、性能测试,我发现我可以使用 webdriver 采样器来模拟服务器负载时与网站交互的用户体验,从而测量真实用户的体验同时。 我也不能在我们的一个页面上使用记录,因为它使用 GWT-RPC 调用。所以我正在使用 Webdriver 采样器。
我已经开始并编写了一些代码。当我运行测试计划时,浏览器将打开,它只会停留在空白屏幕上。
你知道为什么它没有转到 URL 吗?
我的设置是
Test Plan
Thread Group
HTTP Cookie Manager
jp@gc - Firefox Driver Config
jp@gc - Web Driver Sampler
Webdriver 采样器代码如下:
var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait)
var wait = new support_ui.WebDriverWait(WDS.browser, 5000)
WDS.sampleResult.sampleStart()
WDS.browser.get('http://riaz-pc.infoshare.local:8080/clearcore')
var userNameTxtBox = WDS.browser.findElement(pkg.By.id('unid'))
userNameTextBox.click()
WDS.log.info(WDS.name + ' has logged an entry');
WDS.sampleResult.sampleEnd()
【问题讨论】:
标签: webdriver jmeter jmeter-plugins