You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2011/07/08 11:40:49 UTC

DO NOT REPLY [Bug 51488] New: Assertion: Variable name scope is shared among all assertions

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

             Bug #: 51488
           Summary: Assertion: Variable name scope is shared among all
                    assertions
           Product: JMeter
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: notifications@jakarta.apache.org
        ReportedBy: jens_0@hotmail.com
    Classification: Unclassified


In case two assertions (Response assertions) exist in a test tree, the text
value in "JMeter Variable" which was last displayed is also shown on other
assertions, in case "JMeter Variable" is not selected in "Apply to".

While this is no functional problem, this is awkward as variable names are
displayed in other assertions who have nothing to do with them.

Suggested resolution:

ScopePanel.java:
    public void setScopeAll() {
        allButton.setSelected(true);
        variableName.setText("");
    }

    public void setScopeChildren() {
        childButton.setSelected(true);
        variableName.setText("");
    }

    public void setScopeParent() {
        parentButton.setSelected(true);
        variableName.setText("");
    }

    public void setScopeVariable(String value) {
        variableButton.setSelected(true);
        variableName.setText(value);
    }
    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

jens_0@hotmail.com changed:

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

--- Comment #3 from jens_0@hotmail.com 2011-07-21 13:24:02 UTC ---
This introduces a problem (Nullpointerexception) in case variableName is null
(enableVariableButton = false in constructor).

This is the case for example with durationAssertion. 
We need to add
 if (variableName != null)
to setScope...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |etudenhoefner@googlemail.co
                   |                            |m

--- Comment #1 from Milamber <mi...@apache.org> 2011-07-11 17:30:19 UTC ---
*** Bug 51255 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

--- Comment #6 from Milamber <mi...@apache.org> 2011-07-22 17:04:30 UTC ---
Hello Jens, 

I thinks you use a old revision of ScopePanel?

Since first close of this bug, ScopePanel has changed
URL: http://svn.apache.org/viewvc?rev=1145254&view=rev

I used enableVariableButton like the constructor method to keep harmony to
resolve the orignal bug.

Have you a more details logs for the NPE?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

jens_0@hotmail.com changed:

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

--- Comment #7 from jens_0@hotmail.com 2011-07-29 06:34:37 UTC ---
Ok that should work also.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

Milamber <mi...@apache.org> changed:

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

--- Comment #2 from Milamber <mi...@apache.org> 2011-07-11 17:42:41 UTC ---
Thanks for your suggested resolution.
Fixed.

URL: http://svn.apache.org/viewvc?rev=1145254&view=rev
Log:
Bug 51488 - Assertion: Variable name scope is shared among all assertions (and
Bug 51255)

Modified:
   
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java
   
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/SizeAssertionGui.java
   
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractScopedJMeterGuiComponent.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

--- Comment #5 from jens_0@hotmail.com 2011-07-22 11:57:26 UTC ---
Hi Milamber,

I don't think so.

setScopeVariable is probably only called on elements which have this.

My change was:
    public void setScopeAll() {
        allButton.setSelected(true);
        if (variableName != null)
            variableName.setText("");
    }

    public void setScopeChildren() {
        childButton.setSelected(true);
        if (variableName != null)
            variableName.setText("");
    }

    public void setScopeParent() {
        parentButton.setSelected(true);
        if (variableName != null)
            variableName.setText("");
    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 51488] Assertion: Variable name scope is shared among all assertions

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

--- Comment #4 from Milamber <mi...@apache.org> 2011-07-21 20:08:36 UTC ---
Created attachment 27308
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27308
New patch to check

Hello,

This patch corrects the NPE for you?

Milamber

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org