jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Speteanu <asp.ad...@gmail.com>
Subject Re: How to capture a value in one of the thread and passing it to the other thread in the same test plan
Date Thu, 19 Jan 2012 11:05:13 GMT
Hi,

You can also consider this:
http://jmeter.apache.org/usermanual/best-practices.html#beanshell_server

if you use the method described in previous mail by Robin.

Regards,
Adrian

On Mon, Jan 9, 2012 at 6:48 PM, Robin D. Wilson <rwilson2@gmail.com> wrote:

> I've used "Properties" before...
>
> I have this in one of my test plans (in a "User Parameters" pre-processor)
> :
>
>        threadStartTime = ${__javaScript(var ms = new Date; ms.getTime();)}
>
>        theTime = ${__setProperty(ThreadStartTime, ${threadStartTime})}
>
> (theTime variable isn't used anywhere).
> Then I use (in the next thread group - in a "User Parameter"
> pre-processor):
>
>        lastThreadStartTime = ${__P(ThreadStartTime,0)}
>
> This method only works when the thread groups run sequentially though...
>
> --
> Robin D. Wilson
> Sr. Director of Web Development
> KingsIsle Entertainment, Inc.
> VOICE: 512-777-1861
> www.KingsIsle.com
>
>
> -----Original Message-----
> From: Bruce Ide [mailto:flyingrhenquest@gmail.com]
> Sent: Monday, January 09, 2012 10:07 AM
> To: JMeter Users List
> Subject: Re: How to capture a value in one of the thread and passing it to
> the other thread in the same test plan
>
> Hmm. I'm not using semaphores in JmeterThreadSync, but you could easily
> modify just the CheckPointObject to acquire them. Though it might be easier
> to check for unreleased semaphores in the Config element at test start or
> test end time.
>
> The couple of tests I wrote with this code were very complex due to the
> threading and the stuff that was being tested should have been modified to
> allow for linear testing with a usability defect. I'm not entirely sure
> that
> level of IPC should be commonly available in the tool; if you really need
> it, you should probably have the technical skills to set it up. I think
> that
> gives you a better chance to understand and accept the risks involved.
>
> That being said, this is probably going to gnaw on me now, so I might end
> up
> taking a look at it over some weekend anyway. You know the next guy is
> going
> to want it to run across multiple machines, though...
>
> --
> Bruce Ide
> FlyingRhenquest@gmail.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message