You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Anthony Johnson <an...@gmail.com> on 2012/01/27 16:28:02 UTC
JTextField popup
Hey Devs,
Just wanting to get some feedback before I proceed forward.
Idea: Create a JTextField/JTextArea right click pop-up that gives the
user short-cuts to useful things.
Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
Goal: Make the entire variable/property system more accessible since
it is required to write a good Test Plan.
What I have so far is a custom JTextField that has a right click menu
with all the defined properties in it. I haven't seen the work that
was done for Undo support, but I'm hoping that we now have a custom
JTextField and JTextArea classes that have already been plumbed in
which would not make this such a huge addition.
Does this sound useful?
Thanks,
Anthony
Re: JTextField popup
Posted by sebb <se...@gmail.com>.
On 30 January 2012 01:23, Anthony Johnson <an...@gmail.com> wrote:
> On Sun, Jan 29, 2012 at 7:52 PM, sebb <se...@gmail.com> wrote:
>> On 29 January 2012 18:49, Anthony Johnson <an...@gmail.com> wrote:
>>> Hey Sebb,
>>> The point is to keep track of variable scoping and give the user a
>>> quick link to in-scope variables.
>>
>> Variables don't have a scope - or rather, their scope is the entire
>> active thread.
>> And the only sure way to know what variables are defined at a
>> particular point is to run the test.
>
> Those variables are entered into a JTextField, JTextArea, etc and they
So are just about all other JMeter inputs ...
> have a defined format.
No, they don't. Any non-empty character string is valid as a variable name.
> Why would I not be able to add an onChange triggers to know when a variable is declared?
Apart from the fact that onChange only works when the field is
changed, so would not work on existing test plans?
There is no easy way to distinguish which fields are variable names.
For example, is https a variable name or a protocol name? Are you
sure?
> The Beanshell-type areas would need some custom work,
*All* the variable definitions would require custom work.
> but imagine having a context or
As I already wrote, there is no context for variables.
> code-complete for variables and functions in those Beanshell JTextArea
> input areas. It would speed up a lot of Test Creation activities and
> cut down on a lot of view switching.
If it were possible, yes of course it would be useful.
But it's not possible in general.
It would be a lot of work to just extract variable names from normal
test elements, and that is only part of it.
Just create a list of variable names as you are creating the test
plan; that will then be useful documentation for anyone else using the
plan.
You can even use the comment field on the test plan to document them.
>>
>> In theory it would be possible to extract a list of variable names
>> from their definition elements - but there are a lot of different ways
>> variables can be defined (test elements, functions, scripts), so this
>> would be a lot of work. But would still not know which ones would be
>> set at a given point, so it would not be possible to provide a
>> context-sensitive list.
>>
>> If a test uses a lot of variables, just use a naming convention and document it.
>>
>>> For instance, user is editing a text field. User right-clicks and
>>> sees a JMenu for "Thread Variables". Highlighting that Menu would
>>> show a list of JMenuItems for each variable that is in-scope.
>>>
>>> If not a right-click menu, I think a code-complete type of interactive
>>> typing would be nice as well.
>>>
>>> Thanks for the reply!
>>>
>>> Anthony
>>>
>>> On Sun, Jan 29, 2012 at 10:49 AM, sebb <se...@gmail.com> wrote:
>>>> On 27 January 2012 15:28, Anthony Johnson <an...@gmail.com> wrote:
>>>>> Hey Devs,
>>>>> Just wanting to get some feedback before I proceed forward.
>>>>>
>>>>> Idea: Create a JTextField/JTextArea right click pop-up that gives the
>>>>> user short-cuts to useful things.
>>>>>
>>>>> Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
>>>>>
>>>>> Goal: Make the entire variable/property system more accessible since
>>>>> it is required to write a good Test Plan.
>>>>>
>>>>> What I have so far is a custom JTextField that has a right click menu
>>>>> with all the defined properties in it. I haven't seen the work that
>>>>> was done for Undo support, but I'm hoping that we now have a custom
>>>>> JTextField and JTextArea classes that have already been plumbed in
>>>>> which would not make this such a huge addition.
>>>>>
>>>>> Does this sound useful?
>>>>
>>>> I don't understand the proposal.
>>>>
>>>> There is already a Property Display under Workbench; not sure if
>>>> that's what you want.
>>>>
>>>>> Thanks,
>>>>>
>>>>> Anthony
Re: JTextField popup
Posted by Anthony Johnson <an...@gmail.com>.
On Sun, Jan 29, 2012 at 7:52 PM, sebb <se...@gmail.com> wrote:
> On 29 January 2012 18:49, Anthony Johnson <an...@gmail.com> wrote:
>> Hey Sebb,
>> The point is to keep track of variable scoping and give the user a
>> quick link to in-scope variables.
>
> Variables don't have a scope - or rather, their scope is the entire
> active thread.
> And the only sure way to know what variables are defined at a
> particular point is to run the test.
Those variables are entered into a JTextField, JTextArea, etc and they
have a defined format. Why would I not be able to add an onChange
triggers to know when a variable is declared? The Beanshell-type
areas would need some custom work, but imagine having a context or
code-complete for variables and functions in those Beanshell JTextArea
input areas. It would speed up a lot of Test Creation activities and
cut down on a lot of view switching.
>
> In theory it would be possible to extract a list of variable names
> from their definition elements - but there are a lot of different ways
> variables can be defined (test elements, functions, scripts), so this
> would be a lot of work. But would still not know which ones would be
> set at a given point, so it would not be possible to provide a
> context-sensitive list.
>
> If a test uses a lot of variables, just use a naming convention and document it.
>
>> For instance, user is editing a text field. User right-clicks and
>> sees a JMenu for "Thread Variables". Highlighting that Menu would
>> show a list of JMenuItems for each variable that is in-scope.
>>
>> If not a right-click menu, I think a code-complete type of interactive
>> typing would be nice as well.
>>
>> Thanks for the reply!
>>
>> Anthony
>>
>> On Sun, Jan 29, 2012 at 10:49 AM, sebb <se...@gmail.com> wrote:
>>> On 27 January 2012 15:28, Anthony Johnson <an...@gmail.com> wrote:
>>>> Hey Devs,
>>>> Just wanting to get some feedback before I proceed forward.
>>>>
>>>> Idea: Create a JTextField/JTextArea right click pop-up that gives the
>>>> user short-cuts to useful things.
>>>>
>>>> Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
>>>>
>>>> Goal: Make the entire variable/property system more accessible since
>>>> it is required to write a good Test Plan.
>>>>
>>>> What I have so far is a custom JTextField that has a right click menu
>>>> with all the defined properties in it. I haven't seen the work that
>>>> was done for Undo support, but I'm hoping that we now have a custom
>>>> JTextField and JTextArea classes that have already been plumbed in
>>>> which would not make this such a huge addition.
>>>>
>>>> Does this sound useful?
>>>
>>> I don't understand the proposal.
>>>
>>> There is already a Property Display under Workbench; not sure if
>>> that's what you want.
>>>
>>>> Thanks,
>>>>
>>>> Anthony
Re: JTextField popup
Posted by sebb <se...@gmail.com>.
On 29 January 2012 18:49, Anthony Johnson <an...@gmail.com> wrote:
> Hey Sebb,
> The point is to keep track of variable scoping and give the user a
> quick link to in-scope variables.
Variables don't have a scope - or rather, their scope is the entire
active thread.
And the only sure way to know what variables are defined at a
particular point is to run the test.
In theory it would be possible to extract a list of variable names
from their definition elements - but there are a lot of different ways
variables can be defined (test elements, functions, scripts), so this
would be a lot of work. But would still not know which ones would be
set at a given point, so it would not be possible to provide a
context-sensitive list.
If a test uses a lot of variables, just use a naming convention and document it.
> For instance, user is editing a text field. User right-clicks and
> sees a JMenu for "Thread Variables". Highlighting that Menu would
> show a list of JMenuItems for each variable that is in-scope.
>
> If not a right-click menu, I think a code-complete type of interactive
> typing would be nice as well.
>
> Thanks for the reply!
>
> Anthony
>
> On Sun, Jan 29, 2012 at 10:49 AM, sebb <se...@gmail.com> wrote:
>> On 27 January 2012 15:28, Anthony Johnson <an...@gmail.com> wrote:
>>> Hey Devs,
>>> Just wanting to get some feedback before I proceed forward.
>>>
>>> Idea: Create a JTextField/JTextArea right click pop-up that gives the
>>> user short-cuts to useful things.
>>>
>>> Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
>>>
>>> Goal: Make the entire variable/property system more accessible since
>>> it is required to write a good Test Plan.
>>>
>>> What I have so far is a custom JTextField that has a right click menu
>>> with all the defined properties in it. I haven't seen the work that
>>> was done for Undo support, but I'm hoping that we now have a custom
>>> JTextField and JTextArea classes that have already been plumbed in
>>> which would not make this such a huge addition.
>>>
>>> Does this sound useful?
>>
>> I don't understand the proposal.
>>
>> There is already a Property Display under Workbench; not sure if
>> that's what you want.
>>
>>> Thanks,
>>>
>>> Anthony
Re: JTextField popup
Posted by Anthony Johnson <an...@gmail.com>.
Hey Sebb,
The point is to keep track of variable scoping and give the user a
quick link to in-scope variables.
For instance, user is editing a text field. User right-clicks and
sees a JMenu for "Thread Variables". Highlighting that Menu would
show a list of JMenuItems for each variable that is in-scope.
If not a right-click menu, I think a code-complete type of interactive
typing would be nice as well.
Thanks for the reply!
Anthony
On Sun, Jan 29, 2012 at 10:49 AM, sebb <se...@gmail.com> wrote:
> On 27 January 2012 15:28, Anthony Johnson <an...@gmail.com> wrote:
>> Hey Devs,
>> Just wanting to get some feedback before I proceed forward.
>>
>> Idea: Create a JTextField/JTextArea right click pop-up that gives the
>> user short-cuts to useful things.
>>
>> Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
>>
>> Goal: Make the entire variable/property system more accessible since
>> it is required to write a good Test Plan.
>>
>> What I have so far is a custom JTextField that has a right click menu
>> with all the defined properties in it. I haven't seen the work that
>> was done for Undo support, but I'm hoping that we now have a custom
>> JTextField and JTextArea classes that have already been plumbed in
>> which would not make this such a huge addition.
>>
>> Does this sound useful?
>
> I don't understand the proposal.
>
> There is already a Property Display under Workbench; not sure if
> that's what you want.
>
>> Thanks,
>>
>> Anthony
Re: JTextField popup
Posted by sebb <se...@gmail.com>.
On 27 January 2012 15:28, Anthony Johnson <an...@gmail.com> wrote:
> Hey Devs,
> Just wanting to get some feedback before I proceed forward.
>
> Idea: Create a JTextField/JTextArea right click pop-up that gives the
> user short-cuts to useful things.
>
> Things: Properties, Variable names in scope, JMeter functions, Copy/Cut/Paste
>
> Goal: Make the entire variable/property system more accessible since
> it is required to write a good Test Plan.
>
> What I have so far is a custom JTextField that has a right click menu
> with all the defined properties in it. I haven't seen the work that
> was done for Undo support, but I'm hoping that we now have a custom
> JTextField and JTextArea classes that have already been plumbed in
> which would not make this such a huge addition.
>
> Does this sound useful?
I don't understand the proposal.
There is already a Property Display under Workbench; not sure if
that's what you want.
> Thanks,
>
> Anthony