0
votes

I have a JMeter test that has two thread groups. The first thread group goes out and gets auth and audit tokens. The second requires the tokens to test the APIs on which I'm interested in gathering performance data. I have Listeners set up as children of the samplers in the second thread group only. Running JMeter I get the results I want. But when I execute the same test from Jenkins, I get results from the both of the thread groups. I don't want the results from the first thread group. They clutter up my graphs and since there is only one execution of each they fluctuate, performance wise, enough to trigger my unstable/failed percentages routinely. Is there a way to get Jenkins to report on only the listeners/samplers I want? Do I have to run one test to get the tokens and another to test? If so, how do I pass the tokens from one test to the other?

1
On Jenkins, are you running tests in distributed environment? If that is the case then you can try changing your threadgroup names like this.. ${__machineName()}_My Threadgroup name. I faced somehow similar issues in distributed env and was able to resolve using thisTestingWithArif
Thanks for the reply. I tried your solution and it didn't seem to make any difference. Jenkins is being used in a distributed environment. I think it wraps a listener around the whole JMeter job and reports on all API calls. I tried running the threads in separate tests but getting the tokens from one to the other seemed to be a real pain. So I created a PowerShell script that gets the tokens and writes them to a CSV file. That is used as input to the 'second thread' that I run on it's own. Maybe not the most elegant solution, but it works.Doug

1 Answers

0
votes

You can execute 2 jenkins jobs:

  • First job write to file the tokens using BeanShell/JSR223 PostProcessor

  • Second job read the tokens from file using CSV Data Set Config