2

I am executing my selenium script using Selenium/WebDriver sampler and after the execution of multiple threads, the reporting is fine i.e. showing for each User and URL but didn't get any response times. Please refer to the below screenshots for more information.

Image 1: Dashboard Report

enter image description here

Image 2: My Test Plan

enter image description here

I don't know why it is not showing the response times. I have also tried it by using the simple short script using google.com and try to execute the test plan in the same way as my actual one but in this case also I cannot get the response times as well. Can anyone please help me?

2
  • Multi threading is dangerous when you don't make reports thread safe . It might look as if it's working but in reality it may not be – PDHide Apr 21 '20 at 6:55
  • 1
    hey, thanks for your reply. In reality, it's working also as I have used chrome driver and all the scripts are running fine as I am getting the real execution without using the headless mode of chrome. Actually I haven,t use the sample start() and sampleEnd() in my samplers, I have just put the sampleStart() in the first sampler and sampleEnd() at the end of the last sampler thinking of that it will maintain hierarchy for all the samplers in sequence wise which is wrong. Now I have added the sampleStart() and sampleEnd() in every sampler and now It works. – Rajan Apr 21 '20 at 7:29
3

It doesn't show response times because you don't measure it in your own code.

If you look into a minimal example code from the WebDriver Tutorial

WDS.sampleResult.sampleStart()
WDS.browser.get('http://google.com')
WDS.sampleResult.sampleEnd()

If you look into JavaDoc for SampleResult class you will see the following documentation:

sampleStart()

Record the start time of a sample

and

sampleEnd()

Record the end time of a sample and calculate the elapsed time

So the elapsed time is basically the time delta between calling WDS.sampleResult.sampleEnd() and WDS.sampleResult.sampleStart() functions, just add them to appropriate places in your script and you should start getting the numbers.

More information: Using Selenium with JMeter's WebDriver Sampler

2
  • yes !! I put the sampleStart() in the first sampler and sampleEnd() at the end of the last sampler thinking of that it will maintain hierarchy for all the samplers in sequence wise which is wrong. Now I have added the sampleStart() and sampleEnd() in every sampler and now It works. Thanks a lot :) – Rajan Apr 21 '20 at 7:24
  • Can we get the ajax requests as well in this way like I have to get the ajax requests and want to see in the dashboard reporting with response times ?? – Rajan Apr 21 '20 at 12:34

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.