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

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

Note You need to log in before you can comment on or make changes to this bug.
Description Rub 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 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:

Comment 3 Sebb 2007-07-06 05:49:26 UTC
*** Bug 42800 has been marked as a duplicate of this bug. ***