NickL
NickL

Reputation: 108

JMeter WebDriver Subsample labels not appearing in results

When using the WebDriver plugin for JMeter and using subsamples the labels that are set during the test do not appear in the results jtl file (and therefore the results tree/aggregate report etc.

WebDriver code (name = TestSampler):

WDS.sampleResult.subSampleStart('First SubSample')
...
WDS.sampleResult.subSampleEnd(true)

WDS.sampleResult.subSampleStart('Second SubSample')
...
WDS.sampleResult.subSampleEnd(true)
Desired outcome:

result.jtl file:

... 1603546255925,1000,First SubSample,,,ThreadGroup 1-1,text,true,,0,0,1,1,null,0,0,0 1603546257658,1000,Second SubSample,,,ThreadGroup 1-1,text,true,,0,0,1,1,null,0,0,0

Actual outcome:

result.jtl file:

... 1603546255925,1000,TestSampler-0,,,ThreadGroup 1-1,text,true,,0,0,1,1,null,0,0,0 1603546257658,1000,TestSampler-1,,,ThreadGroup 1-1,text,true,,0,0,1,1,null,0,0,0

note that the only difference is that the value passed to the ...subSampleStart(label) function appears in the result file instead of an indexed version of the sampler name.

Upvotes: 0

Views: 860

Answers (1)

Dmitri T
Dmitri T

Reputation: 168122

  1. Add the next line to user.properties file:

    subresults.disable_renaming=true
    
  2. Restart JMeter to pick the property up

  3. Next time you will run your test you will see expected names

For GUI mode you can tick Functional Test Mode box on Test Plan level:

enter image description here

More information:

Upvotes: 2

Related Questions