Bug 59171 - Sample Result SaveConfig Dialog is generated in random order
Summary: Sample Result SaveConfig Dialog is generated in random order
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-12 21:25 UTC by Sebb
Modified: 2016-04-15 22:26 UTC (History)
1 user (show)



Attachments
Sample JMX with Simple Data Writer (2.24 KB, text/plain)
2016-03-12 21:42 UTC, Sebb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2016-03-12 21:25:04 UTC
The dialog is built dynamically from the methods in the SampleSaveConfiguration class. These may be returned in any order, and on some JVMs the order may vary.

This is confusing.

It would be better to generate these in a fixed order.

One possible such order is alphabetical by title.
This makes it easy to find entries, but will vary when changing languages.

Another would be to sort by property name.
That won't change with the language, but IMO does not make it quite as easy to find the entries. YMMV.
However at least it's better than an unstable random order.

In both cases adding a new property will generally affect the layout, as later entries will move within the 3 column dialogue.
Comment 1 Sebb 2016-03-12 21:42:36 UTC
Created attachment 33663 [details]
Sample JMX with Simple Data Writer
Comment 2 Sebb 2016-03-12 21:46:37 UTC
URL: http://svn.apache.org/viewvc?rev=1734740&view=rev
Log:
Sample Result SaveConfig Dialog is generated in random order
TODO - remove the test code when the sort order is decided
Bugzilla Id: 59171

To test:

jmeter -t SaveConfig.jmx [-Dsaveconfig.sort=[text|other]]

If the property is omitted, no sort is done (as per now)
text = order by display text
other = order by property name

Note: once the best order is decided, the property and redundant code can be dropped. This seemed the simplest way for devs to test the feature.
Comment 3 Philippe Mouawad 2016-03-12 21:53:05 UTC
Adding tag "fix_before_3.0" so that we don't forget to remove the temp property.
Comment 4 Philippe Mouawad 2016-03-12 22:33:09 UTC
(In reply to Sebb from comment #0)
> The dialog is built dynamically from the methods in the
> SampleSaveConfiguration class. These may be returned in any order, and on
> some JVMs the order may vary.
> 
> This is confusing.
> 
> It would be better to generate these in a fixed order.
> 
> One possible such order is alphabetical by title.
> This makes it easy to find entries, but will vary when changing languages.
> 

+1 for this option

> Another would be to sort by property name.
> That won't change with the language, but IMO does not make it quite as easy
> to find the entries. YMMV.
> However at least it's better than an unstable random order.
> 
> In both cases adding a new property will generally affect the layout, as
> later entries will move within the 3 column dialogue.
Comment 5 Sebb 2016-03-17 01:14:20 UTC
The order of entries is now defined by a list in SampleSaveConfiguration.

This order is currently somewhat arbitrary, but agrees with a screenshot.

URL: http://svn.apache.org/viewvc?rev=1735354&view=rev
Log:
Sample Result SaveConfig Dialog is generated in random order
Bugzilla Id: 59171

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
    jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java

TODO: a better order, plus documentation updates as necessary
Comment 6 Sebb 2016-03-17 01:34:03 UTC
Updated to use documentation order (such as it is):

URL: http://svn.apache.org/viewvc?rev=1735356&view=rev
Log:
Sample Result SaveConfig Dialog is generated in random order
Use order from http://jmeter.apache.org/usermanual/listeners.html#csvlogformat
Bugzilla Id: 59171

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
Comment 7 Sebb 2016-03-17 17:38:51 UTC
URL: http://svn.apache.org/viewvc?rev=1735467&view=rev
Log:
Sample Result SaveConfig Dialog is generated in random order
Move knowledge of method names to the class that contains them
Bugzilla Id: 59171

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
    jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java
Comment 8 Philippe Mouawad 2016-03-23 20:09:04 UTC
Ok for me
Comment 9 Philippe Mouawad 2016-03-27 19:59:56 UTC
Hi sebb, 
This bug is not in changes.xml.
Should it be ?
Can it know be closed ?
Thanks
Comment 10 Sebb 2016-03-28 15:30:19 UTC
(In reply to Philippe Mouawad from comment #9)
> Hi sebb, 
> This bug is not in changes.xml.
> Should it be ?

Yes, when it is regarded as fixed. 
It is a change to the behaviour of released code.

> Can it know be closed ?

I would like to hear from others as to whether the order is reasonable or not.
Ideally we don't want to change it later, so it's worth trying to get it right now if we can.

> Thanks
Comment 11 Vladimir Sitnikov 2016-03-31 22:20:22 UTC
The order of items looks fine to me (as of https://svn.apache.org/repos/asf/jmeter/trunk@1737287).
Comment 12 Philippe Mouawad 2016-04-15 22:26:58 UTC
Date: Fri Apr 15 22:26:41 2016
New Revision: 1739377

URL: http://svn.apache.org/viewvc?rev=1739377&view=rev
Log:
Bug 59171 - Sample Result SaveConfig Dialog is generated in random order
Mention it in changes.xml
Bugzilla Id: 59171

Modified:
    jmeter/trunk/xdocs/changes.xml