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 2020/09/11 11:20:20 UTC

[Bug 64736] New: Default value 1 is not returned in __P function when the default value is not set

https://bz.apache.org/bugzilla/show_bug.cgi?id=64736

            Bug ID: 64736
           Summary: Default value 1 is not returned in __P function when
                    the default value is not set
           Product: JMeter
           Version: 5.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: janesh@pragmatictesters.com
  Target Milestone: JMETER_5.3.1

It is noted that get property function __P does not return value 1 when the
default value is not set in the function as per the documentation.

https://jmeter.apache.org/usermanual/functions.html#__P

Steps to reproduce 
1. Start JMeter in command line 
jmeter -Jgroup1.threads=7 -Jhostname1=www.realhost.edu

2. Check the value of undefined property with function helper dialog window 
${__P(group1.loops)} 

Expected Outcome :
Value 1 should be returned when default value is not set according to the
documentation 

"**Default Value** : The default value for the property. If omitted, the
default is set to "1"."


Actual Outcome :
Nothing is returned when the function is executed 

It was confirmed that this is a bug in the documentation
https://stackoverflow.com/questions/63845674/default-value-1-is-not-returned-when-the-default-value-is-omitted

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

[Bug 64736] Default value 1 is not returned in __P function when the default value is not set

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

Felix Schumacher <fe...@internetallee.de> changed:

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

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the report. The documentation is correct.

If you use the example, you gave here, then JMeter will expand the expression
to "1". In your example on StackOverflow you used ${__P(group1.loops,)}
(probably generated by the function helper), which has an empty default value
and thus renders to "".

One might want to argue that the function helper shouldn't render the empty
default value into the copy&paste examples, but that would be another
bug/enhancement.

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

[Bug 64736] Default value 1 is not returned in __P function when the default value is not set

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

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

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

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