----- Original Message ----- From: "Jordi Salvat i Alabart" <[EMAIL PROTECTED]> To: "JMeter Developers List" <[EMAIL PROTECTED]> Sent: Friday, January 02, 2004 6:20 PM Subject: Re: TestBeans: proof of concept
> En/na Sebastian Bazley ha escrit: > > ----- Original Message ----- > > From: "Jordi Salvat i Alabart" <[EMAIL PROTECTED]> > > To: "JMeter Developers List" <[EMAIL PROTECTED]> > > Sent: Friday, January 02, 2004 12:51 AM > > Subject: TestBeans: proof of concept > > [...] > > OK, this seems to work, except that "runningVersion" should not appear in the GUI. > > (perhaps others as well?) > > - don't know if this affects the design or not. > > I know. My initial version was stopping introspection at the TestBean > class, so that any properties defined below that would not appear. > You'll see the "name" property appearing twice, for example. But when I > created the TestBeanBeanInfo class I had to remove that... I'll find a > solution for this -- eventually. Worst-case, I will mark those > properties as hidden. OK > > Also, the field names will need to become resources - I guess this will be easy > > enough. > > Having display names for the properties is part of the Java Beans spec. > I don't know about i18n, but I will find out. If there isn't a standard > way, we can invent one -- looks pretty trivial. OK - might be worth setting up an example. > > > > Some tidying up to do, e.g. some fields should be check-boxes (and I think we'll > > need radio buttons elsewhere). > > My idea is not to have any checkboxes. Boolean fields, for example, > would be edited with a combo box having 4 options: > - "Use default" (or "undefined") > - "Yes" > - "No" > - a user-entered string (to enable using variables and functions) Good idea - I'd forgotten about that. Were you planning to do the same with radio buttons? For example, Size Assertion has quite a few radio buttons to select the different comparison types. Would this be as easy to use if it was a combo-box? > We could define property attributes to control which of these options > should be available for each individual property. And of course you > always have the option to create your own property editor. OK [...] > > > > Need to allow for multiple input fields on a single line, and logical grouping of > > fields. > > Would this be difficult? > > I was planning on logical grouping and explicit ordering. On multiple > fields on a single line, I had not thought about it. I'm not sure it's a > good idea. I was thinking of GUIs which have a lot of options; having to use separate lines for each might make the screen rather long. For example: - HTTPSampler has Follow Redirects, Use KeepAlive, Retrieve All Embedded Resources. - ThreadGroup has Loop Count with ForEver and Text input boxes which logically belong on the same line. But there are other ways of arranging these. > > > > >>The component probably doesn't work. Of course I'll need to fix this > >>before declaring the proof-of-concept complete. > >> > > > > > > I would add that being able to replicate the existing GUI layout (more or less) is > > also necessary. > > I don't think that's a point. Replicating the existing GUI is trivial by > using a bean customizer. I had not realised that it is trivial, but given that it is, I agree. > The interest is in obtaining a GUI with > equivalent (or better) functionality and usability, but more consistent > and with less work. Agreed. > [...] > >>I don't think I've done any other relevant changes (well, I've tried not > >>to). > > > > The JMeterProperty keys have been removed > > - I think they will need to be retained so that old JMX files can be converted, at > > least. > > Could perhaps extend the upgrade.properties file processing to handle this? > > The upgrade path is something I've not given much thought to. I'm not so > sure there will be a clean and safe upgrade path -- which is a problem, > of course. This is critical for us, so needs to be addressed, in my view. [...] > > However, I do think the GUI needs to be customisable. > > I think there's very few cases in which it needs to. The visualisers are > probably the only really good example. If the GUI layout changes drastically, it may increase the re-learning curve. I was also referring to the need to be able to arrange the fields on the screen in a logical order, and group them - a simple list ordered alphabetically by variable name is not all that easy to use ... > > > Is there a danger that the new GUI classes will then become very complicated? > > Not more complicated than they are now. Java Beans GUI stuff is really > simple: either you provide an AWT component that does the editing (in > which case you essentially revert to what we have now) or you let the > platform do it for you -- you can still provide hints, of course, plus > components to be used to edit individual properties (as I've done for > the Arguments property). Yes, the arguments editor works well - except that it should probably not have a title on the left hand side. It would be useful to see how to arrange the other HTTPSamplerBean properties in logical groups. > > > Should we be looking at a GUI design language ? > > > > For example, XUL - http://www.mozilla.org/xpfe/xptoolkit/index.html - not sure if > > that is suitable for our purposes as it stands. > > > > I don't think we have such big GUI requirements to justify the > investment. In any case, that would be a different development -- not > incompatible at all with this experiment, I guess. Depends on how difficult it is to generate a nice layout ... > > >>The GUI is based in two classes only: HTTPSamplerBeanBeanInfo (4 lines > >>of code) and HTTPArgumentsEditor (3 lines). They are necessary because > >>the HTTPSampler is a particularly complex test element, in that its GUI > >>has an embedded ArgumentsPanel, that is: the GUI for another test > >>element is embedded here. I chose it precisely because of this > >>complexity: I wanted to prove that the two approaches (old-style > >>testelements and TestBeans) can interoperate fully. > > > > > > The GUI classes are now in the same directory as the sampler, whereas previously > > they were in a separate gui/ directory. > > I prefer retaining a separate directory. > > The default way for the beans stuff to obtain a property editor for a > class is to append the name "Editor" to the class name -- in the same > package. You can also provide a list of editor search paths, but I > prefer to stick to the default ways unless there's a good reason to do > otherwise. > > The same applies to the BeanInfo classes. > OK, point taken. [...] > >>Constructive and destructive comments welcome. > >> > > > > > > Well done for tackling the GUI set-up complications! > > > > But I'm a bit concerned that quite a lot of work has gone into the current GUI > > design over the years. > > It's not perfect, but I think it is generally well laid out, and it would be > > confusing if all the layouts changed drastically. > > I agree there's a lot of work, but I disagree in that it's generally > well laid out. I find it awful, inconsistent, inconfortable to work > with, full of bugs, and generally annoying. That's of course one of the > main motivators for this experiment. I would expect users to welcome the > cost of getting familiar with a fairly new GUI if the change is for better. Taking the HTTPSampler as an example, I find the existing layout OK. On the whole, related items are grouped together. However, Follow Redirects and Use Keep-Alive need moving - they perhaps belong in the Optional Tasks section. The GUI is awkard to use in some respects (tab order is not always clear, and the selected field is not always obvious etc), but I assume that is down to Swing/Java rather than JMeter. [...] I'm not against your approach, but I'm not yet convinced - it would be useful to complete the HTTPSampler example to see how it all works out. S. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
