1

I'm having next structure of TG in Jmeter: Table Screen Shot

So I have variable LB_LEVEL and 100 threads. It's value for every user may be different (from 1lv to 23lv e.g.) I try to find a way to make some visual report with this variable, simply I have to show how users were casted to different levels. It may be csv, or smh. Ideal table of my dream looks like this: Table Screen Shot

Googling still brings me some foam, so I need a small idea or kick to correct direction. Thank you!

1 Answers1

2
  1. Add the next lines to user.properties file:

    sample_variables=LB_LEVEL
    jmeter.reportgenerator.graph.custom_testGraph.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer
    jmeter.reportgenerator.graph.custom_testGraph.title=LB LEVEL
    jmeter.reportgenerator.graph.custom_testGraph.property.set_Y_Axis=LB LEVEL
    jmeter.reportgenerator.graph.custom_testGraph.set_X_Axis=Over Time
    jmeter.reportgenerator.graph.custom_testGraph.property.set_granularity=60000
    jmeter.reportgenerator.graph.custom_testGraph.property.set_Sample_Variable_Name=LB_LEVEL
    jmeter.reportgenerator.graph.custom_testGraph.property.set_Content_Message=LB_LEVEL:
    

    sample_variables is a special property which saves custom variable(s) into .jtl results file

  2. Restart JMeter to pick the properties up

  3. Run your JMeter test in command-line non-GUI mode and generate the HTML Reporting Dash board as:

    jmeter -n -t <test JMX file> -l <test log file> -e -o <Path to output folder>
    
  4. Open <Path to output folder>/index.html file with your favourite browser - you will see plotted LB_LEVEL values along with other tables and charts.

If for some reason it doesn't fit your needs you can consider using Flexible File Writer to store the metrics of your choice into a file, in your case they would be grpThreads and variable#0

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Wow, thank you! There's one little pin I have with .jtl: I cannot find it in /bin. Is there some special define to say to JMeter that I want log and I want it in .jtl format? – Juliya Sergey Miheeva Nov 12 '18 at 09:37
  • Hi @JuliyaSergeyMiheeva. That special definition is done in the command given to run the JMeter in non-GUI mode. The attribute -l defines the path for the test log file. Please make sure to give "-l path/log.jtl" while executing the test. And of course it is available only after test execution. – M Navneet Krishna Nov 12 '18 at 09:49
  • @MNavneetKrishna If I'll use GUI after non-GUI launch, it won't keep logging to jtl? :( – Juliya Sergey Miheeva Nov 12 '18 at 09:52
  • @JuliyaSergeyMiheeva Let me understand better. So what you are asking is, if you have launched the test using non-GUI mode and the while execution is underway, if at all you were to access JMeter in GUI mode, would it still keep logging to jtl or not? Is this the question? – M Navneet Krishna Nov 12 '18 at 10:07
  • @JuliyaSergeyMiheeva I think I understood where the query came from. When I meant it is available only after test execution, I meant more towards the fact that it can be found only if we run some tests. Without some tests, by default, jtl is not available. Hope that clears some air around. – M Navneet Krishna Nov 12 '18 at 10:14