Bug 40772 - JTL files loading not working properly
Summary: JTL files loading not working properly
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 42800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-16 23:48 UTC by Rubén Laguna
Modified: 2007-07-06 05:49 UTC (History)
1 user (show)



Attachments
Patch to support empty tokens in jtl files (1.95 KB, patch)
2006-10-16 23:51 UTC, Rubén Laguna
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rubén Laguna 2006-10-16 23:48:56 UTC
I've working with jmeter and I noticed a small problem when loading
jtl files back into a listener. The problem relates to empty tokens in
the jtl. 

I'm working with JMeter 2.2, JDBC Samplers and Summary report. The jtl
file looks this way and was created with the Summary Report listener

1160833236328,62,Prepared update,,,Grupo de Hilos 1-1,text,true
1160833236406,0,Prepared Select,,,Grupo de Hilos 1-1,text,true
1160833236406,31,Callable Query,,,Grupo de Hilos 1-1,text,true
1160833236437,16,Callable update,,,Grupo de Hilos 1-1,text,true
1160833236453,0,Prepared update,,,Grupo de Hilos 1-1,text,true


Notice the ",,," part.  Well, when I try to load this jtl file to the same
listener it says it cannot load it. I traced the problem to the StringTokeniker
used in OldSaveService.java at line 142. StringTokenizer silently ignores
empty tokens and the result is that the JTL is not parsed right.

The workaround is to configure the listener to not save the response code nor
the message but I think that the JTL parsing should support the empty fields as
it provides a better user experience. (so the user is not forced to deal with
strange errors when it tries to load the file he just generated a second before).
Comment 1 Rubén Laguna 2006-10-16 23:51:41 UTC
Created attachment 19010 [details]
Patch to support empty tokens in jtl files 

Uses a wrapper around StringTokenizer
Comment 2 Sebb 2006-10-20 16:37:08 UTC
Thanks for the report and patch - in the end I used String.split().

The code in SVN branch 2.2 has been fixed, and is in the nightly build:

2-2.20061020
Comment 3 Sebb 2007-07-06 05:49:26 UTC
*** Bug 42800 has been marked as a duplicate of this bug. ***
Comment 4 The ASF infrastructure team 2022-09-24 20:37:38 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1811