You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2013/07/06 15:55:49 UTC

[Bug 55203] New: TestBeanGUI - wrong settings foumd

https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

            Bug ID: 55203
           Summary: TestBeanGUI - wrong settings foumd
           Product: JMeter
           Version: 2.9
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: sebb@apache.org

The BSF and JSR223 test elements share some common classes and code.

It looks like the Bean Code is getting confused, because the list of languages
for BSF and JSR223 always displays the same.

There are several common entries, but there are some languages that are only
supported by one of the scripting interfaces. For example:

Both
beanshell
java

BSF only
beanbasic
bml
xslt

JSR223 only
ecmascript
rhino

I think this is related to the fact that the same field name is used for both
sets of classes. It looks like only one of the "language" field definitions is
being found by JMeter; sometimes it will be the wrong one.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #7 from Sebb <se...@apache.org> ---
Yes, they share the same rootBeanInfo class, i.e. java.beans.GenericBeanInfo,
which I think is the problem here. Although they are obviously different
instances, the class is what seems to be used for distinguishing cached
elements.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #14 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Issue no more apparent with moving scriptLanguage to 2 subclasses

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #2 from Sebb <se...@apache.org> ---
Broken in 2.8 for me.

I first tried adding BSF and JSR223 samplers to Workbench - looked OK.
I then moved them under Thread Group and saved as JMX (to follow).
On reload, both the drop-downs showed the same list.

I think the problem is that the same PropertyDescriptor instances are created
for what should be different beans. I don't know why that is yet, probably
because the beans share inherited information. Maybe the Introspector
parameters are wrong.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #8 from Sebb <se...@apache.org> ---
(In reply to Philippe Mouawad from comment #5)
> Date: Sun Jul  7 20:04:34 2013
> New Revision: 1500526
> 
> URL: http://svn.apache.org/r1500526
> Log:
> Bug 55203 - TestBeanGUI - wrong language settings found
> Bugzilla Id: 55203
> 
> Modified:
>    
> jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/
> JSR223SamplerBeanInfo.java

Good catch, but unfortunately not the solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|TestBeanGUI - wrong         |TestBeanGUI - wrong
                   |settings foumd              |language settings found

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
I think regression came from 54110.

sebb regarding your test case, I just put them as children of Workbench and I
see they have the same language while they should not

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Debugging I see the 2 classes share the same PropertyDescriptor instance.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #10 from Sebb <se...@apache.org> ---
(In reply to Philippe Mouawad from comment #4)
> I think regression came from 54110.

Bug 54110 moved the common fields and setters/getters to a shared super-class.

I just tried moving them back, and it does not fix the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #3 from Sebb <se...@apache.org> ---
Created attachment 30561
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30561&action=edit
Test case

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #11 from Sebb <se...@apache.org> ---
(In reply to Sebb from comment #10)
> (In reply to Philippe Mouawad from comment #4)
> > I think regression came from 54110.
> 
> Bug 54110 moved the common fields and setters/getters to a shared
> super-class.
> 
> I just tried moving them back, and it does not fix the issue.

Oops, sorry - I thought the lists looked the same, but I'd forgotten I'd
converted JSR223 to all lower case and I was looking for an uppercase entry.
Should have checked more carefully.

The problem does seem to be the shared class with different requirements for
the TAG field.

However, it does not seem to be a problem for the other shared fields where the
attributes may vary - e.g. scripting.displayName which shows the different
script variables that are available.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #9 from Sebb <se...@apache.org> ---
I tried removing the shared setup from the ScriptingBeanInfoSupport class and
copied it down to the BSF and JSR223 classes, and that does not make any
difference either

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #12 from Sebb <se...@apache.org> ---
Hopefully this fixes the issue:

URL: http://svn.apache.org/r1500556
Log:
TestBeanGUI - wrong language settings found
Bugzilla Id: 55203

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java
    jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
    jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java
    jmeter/trunk/xdocs/changes.xml

Leaving open for now in case there are other shared parameters that need moving

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #5 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Sun Jul  7 20:04:34 2013
New Revision: 1500526

URL: http://svn.apache.org/r1500526
Log:
Bug 55203 - TestBeanGUI - wrong language settings found
Bugzilla Id: 55203

Modified:
   
jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerBeanInfo.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #1 from Marko <vl...@gmail.com> ---
This issue started in 2.9. In 2.8 it is all good.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #13 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Sebb from comment #7)
> Yes, they share the same rootBeanInfo class, i.e.
> java.beans.GenericBeanInfo, which I think is the problem here. Although they
> are obviously different instances, the class is what seems to be used for
> distinguishing cached elements.

They really share the same instance.
Issue also affects short description for example.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 55203] TestBeanGUI - wrong language settings found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55203

--- Comment #15 from Sebb <se...@apache.org> ---
I think it must have been a combination of the two issues.

JMeter 2.7 has the problem, and was before the properties were moved to the
shared super-class. However the JSR223SamplerBeanInfo class extended the wrong
base class.

==

There are still properties that are shared between GUI classes - e.g. all the
JSR223 classes share the same definition of the "script" property.

The TAGS field is an attribute of the "script" PropertyDescriptor which varies
between sub-classes whereas the other attributes are identical to all
sub-classes.

I think that is probably why they work OK; the PropertyDescriptor is used to
look-up the names and types of the properties which don't vary. It was only the
TAGS attribute that varied.

-- 
You are receiving this mail because:
You are the assignee for the bug.