1

Ran a Webdriver Sampler that opens a page and then logs-in an account. The configuration were 10 users/threads, Ramp-up period 1, Loop Count 1 on which I had a result shown below:

enter image description here

Would like to know if what could cause this and maybe have better results? Thanks!

1

According to JMeter Glossary:

Latency. JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte. Protocol analysers (such as Wireshark) measure the time when bytes are actually sent/received over the interface. The JMeter time should be closer to that which is experienced by a browser or other application client.

Connect Time. JMeter measures the time it took to establish the connection, including SSL handshake. Note that connect time is not automatically subtracted from latency. In case of connection error, the metric will be equal to the time it took to face the error, for example in case of Timeout, it should be equal to connection timeout.

So these metrics are available only for HTTP Request sampler.

You still can work it around by using Navigation Timings API which is supported by modern browsers and get the numbers by executing some JavaScript code like:

WDS.sampleResult.sampleStart()
WDS.browser.get('http://jmeter-plugins.org')
var timings = WDS.browser.executeScript('var performance = window.performance || window.webkitPerformance || window.mozPerformance || window.msPerformance || {}; var timings = performance.timing || {}; return timings;');
WDS.log.info(timings)
WDS.sampleResult.sampleEnd()

You will be able to get some metrics, calculate Connect and Latency times and store them like:

WDS.sampleResult.setConnectTime(1234);
WDS.sampleResult.setLatency(5678);

WDS Navigation Timings

See The WebDriver Sampler: Your Top 10 Questions Answered article for more WebDriver Sampler tips and tricks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.