2
votes

In JMeter I want to hide the first iteration of my loadtest for caching issues and warmup. For now I have an JSR223 PostProcessor with the next code above each request:

if (vars.getIteration() == 1) {
    prev.setIgnore()
}

This works good, but the results in the aggregate report are incorrect. The transaction controllers are showing with empty numbers and the calculations of the 90% are incorrect. How can I only fill an aggregate report the second iteration?

Testplan:

  • jp@gc - Ultimate Thread Group |> Transactioncontroller |> Sampler

An setUp thread is not working because the cache is not shared between threads

The syntheis report is now:

enter image description here

2
Deleting not required trasaction from the csv/report and again load the modified report in the aggregate Listener by browsing the modified file, will give you the desired result.Is it helpful or you are looking for a way to hide automatically.sunny_teo
True that, this load test is integrated in our CI/CD process and we want avoid manually work...Janp95

2 Answers

2
votes

Create a setUp thread group with 1 user, 1 iteration. Add a Module controller to it. Map the Module controller to the other thread group to run all the samples. If you are running in GUI mode -> create listener for threadgroup alone to get the JTL If you are running in non GUI mode -> Add a JSR223 postprocessor to the threadgroup level and not to any smapler and add the below

(prev.setIgnore())

1
votes
  1. If you have only one sampler under the Transaction Controller - you don't need the Transaction Controller at all therefore your approach should start working
  2. Instead of ignoring the result you can change the sampler labels for 1st iteration like:

    if (vars.get('__jm__jp@gc - Ultimate Thread Group__id').equals('1')) {
        prev.setSampleLabel('IGNORE ME')
    }
    

    and once done you can strip them off via i.e. Filter Results Tool, the tool can be installed using JMeter Plugins Manager and can be executed via command-line like:

    FilterResults.bat --output-file final.jtl --input-file your-test-results.jtl ----exclude-label-regex false --exclude-labels "IGNORE ME"