JM Results

Specific Results for Individual Transactions

Often when using JMeter, I like to see separate results for particular steps, so I can for example, easily see ratios of calls and hone in quickly on slow responses. In JMeter's GUI mode I typically add plugin listeners to give me transaction rates, response time over time and percentiles.

In this solution those graphical plugins are replaced with simple data writer elements but certain coding guidelines must be followed if collated results are required

Once results have been collated, the specific results files can be loaded directly into the GUI plugin graphs and full analysis can be obtained.

There are just two guidelines to be followed:

    1. Results data file names MUST contain the text: 'results'

    2. Results data file format MUST be .csv or .xml

The controller code adjusts the jmeter script to copy data files into the correct place on the injectors. For input data files this is /data and for results data files, /results. The controller determines whether a data file is for input or results by looking at the filename. Therefore it is important that

    a) Any results file names contain the text 'results' and

    b) Any input data fle names DON'T contain the text 'results'

See the code below:


The second golden rule is that results files should either be csv or xml format. But this is not just the selection made in the simple data writer listener (see below), but crucially

    The results data file ending MUST be .csv or .xml

The reason for this is the controller makes decisions based on this filename ending. It collates .csv files but does not collate .xml files, rather just copies them all over to the main results folder.

    Also, do not use .jtl files

This rule is because .jtl files are used for the Jenkins solution and are built interactively by the results analysis script. Any other jtl files in the Jenkins workspace will break the Jenkins CI reporting. See the Jenkins page for details.

Note also, if header titles are selected in the csv files, you will need to sort this out by hand as they will be collated to the bottom of the completed results and there will be as many lines of them as there are injectors. See below for details.

Controller code snippet for .csv files:


Controller code snippet for .xml files


So, if you want collated results for a specific jmeter step, add a simple data writer listener, set the filename to results*.csv and unselect the 'Save as XML' option in the config. Note in this case, I have selected 'Save Field Names (CSV)' but you will see below this does lead to an issue:


XML results can give a lot more information, such as request and response headers, response data, and sampler data, all of which can be very useful when designing models and checking data selection at run time. But these files are not collated, so your results folder will have one copy of this for each injector (see below).

To get this information, add a simple data writer listener, set the filename to results*.xml and select the 'Save As XML' option:


After running a test, you will see in your controller results folder (or the Jenkins workspace shown in this case), the corresponding set of results files. So for example below you can see the bottom file is a collated ('-complete.csv') results file and the 3 files up from that are xml results files that have each been copied over from the relevant injectors (3 of them in this case):


The last thing to mention here is the collated csv results that include the field names. This is useful initially just to get a handle on where each field name ends up in the final file, perhaps for later analysis. I would recommend in general though, not using this option. You end up with a results file with a string of headers at the bottom which the GUI graphing plugins may then struggle with:


[Home] [About (CV)] [Contact Us] [JMeter Cloud] [JM Highlights] [JM Overview] [JM Control] [JM Inject] [JM Threads] [JM Results] [JM Assertions] [JM TPS] [JM Metrics] [JM Runtime] [JM Collation] [JM Logs] [JM 95th] [JM 95th v2] [JM Jenkins] [JM Corporate] [JM Scripts] [JM Variables] [JM Embedded] [JM Hosts] [JM Running] [JM Example] [JM Versions] [webPageTest] [_64 images] [asset moniitor] [Linux Monitor] [Splunk ETL] [Splunk API] [AWS bash] [LR Rules OK] [LR Slave] [LR CI Graphs] [LoadRunner CI] [LR CI Variables] [LR Bamboo] [LR Methods] [LR CI BASH] [Bash methods] [Jenkins V2] [Streaming vid] [How fast] [Finding Issues] [Reporting] [Hand over] [VB Scripts] [JMeter tips] [JMeter RAW] [Dynatrace] [Documents] [FAQ] [Legal]

In the Cartesian Elements Ltd group of companies