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 2017/10/27 07:07:11 UTC

[Bug 61674] New: Introduce global Variables shared accross threads

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

            Bug ID: 61674
           Summary: Introduce global Variables shared accross threads
           Product: JMeter
           Version: 3.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: p.mouawad@ubik-ingenierie.com
  Target Milestone: ---

There is frequently the need in Load Testing for sharing something accross
threads which might have been initialized in a setup Thread Group or by some
Thread.

Currently JMeter has 2 ways to do it:

- Properties but they are limited to String
- Through Beanshell (which is deprecated) through bsh.shared


A recent illustration of this is the Coverage Tests created for JMS, TCP and
FTP.
To do it we had to use Beanshell.

So after discussion:
-
http://mail-archives.apache.org/mod_mbox/jmeter-dev/201710.mbox/%3CCAH9fUpY3jEb%3D_Oa-fuf-RFuSUz2Nop5ix7%2BnPzy-yVc7C47_JA%40mail.gmail.com%3E

This would be introduced this way:

- any variable starting with "global:" is global
- JMeterVariables class modification, which would delegate all variables with
"global:" prefix into global thread-safe map.
- The Map would be ConcurrentMap
- It would be initialized/cleared in StandardJMeterEngine#run or
JMeterContextService.startTest();



See dev discussion:

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

[Bug 61674] Introduce global Variables shared accross threads

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

--- Comment #1 from Sebb <se...@apache.org> ---
This will affect any test which happens to use the global: prefix.

Might be better to use a less likely prefix such as __G__

In any case if it is implemented the release notes need to make the change in
behaviour very clear.

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