jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: JAVA Program as a Service
Date Thu, 16 Aug 2018 20:12:24 GMT
Hi
>So below you are talking of the wrapper script ,
That is a OS specific question. In *nix you'd just do something like
$JAVA_HOME/bin/java stufftorunyourclass &
(where & represents run in background)
In windows you'd probably use windows scripting host
Google how do i run my process in the background for your operating system
of choice

Kirks suggestion of Runtime.exec works (invoked from any Java) too

regards
deepak

On Tue, Aug 14, 2018 at 11:57 PM Nayak, Soumya R. <snayak@firstam.com>
wrote:

> Hi Deepak ,
>
> Thanks for the reply.
> There are two parts to my script running from JMeter.
> The first part will submit HTTP requests and based on some parameters the
> second part is the java executable file which will validate in the backend
> some parameters for about ETA of 4 hours from the start of the test.
> My first part from JMeter might complete in 5-10 minutes , so I did not
> want the Jmeter to be kept on running for the next 4 hours with respect to
> the second part, so that's why thought of making the second part as an
> independent backend process.
>
> So I checked the OS Process Sampler, to "launch" a java executable file as
> per  but I guess OS Process Sampler will wait till the binary execution
> completes to record execution time, return code, any output, etc.
> So below you are talking of the wrapper script , can you help me with it
> so that test continues and the executable is just executed in the backend.
>
> Regards,
> Soumya
>
> -----Original Message-----
> From: Deepak Shetty <shettyd@gmail.com>
> Sent: Saturday, August 11, 2018 10:40 PM
> To: JMeter Users List <user@jmeter.apache.org>
> Subject: Re: JAVA Program as a Service
>
> Hi Soumya
> Note that if you want to use the OS process sampler and you genuinely have
> a need for "the java program runs independently in the background without
> JMeter waiting for it to complete execution" then you have to write a
> wrapper script to run the process in the background and call that wrapper
> script from the OS process sampler. Its a different matter that launching a
> executable from JMeter and then not caring what it does and when it
> finishes is typically not a good thing!
>
> On Sat, Aug 11, 2018 at 7:11 AM sebb <sebbaz@gmail.com> wrote:
>
> > Or
> >
> >
> > http://jmeter.apache.org/usermanual/component_reference.html#OS_Proces
> > s_Sampler
> >
> > On 10 August 2018 at 17:00, Kirk Pepperdine
> > <kirk.pepperdine@gmail.com>
> > wrote:
> > > Runtime.exec in a bean shell???
> > >
> > >> On Aug 10, 2018, at 11:00 AM, Nayak, Soumya R. <snayak@firstam.com>
> > wrote:
> > >>
> > >> Hi All,
> > >>
> > >> I have written a java program. So when i run a script in JMeter,
> > >> the
> > java program has to be invoked from the script and the java program
> > runs independently in the background without JMeter waiting for it to
> > complete execution. The program when running independently completes
> > the task and stops automatically.
> > >> So how can I invoke a java program from JMeter which runs
> > >> independently
> > in the background. Please help.
> > >>
> > >> Regards,
> > >> Soumya
> > >>
> > >>
> > **********************************************************************
> > ********************
> > >> This message may contain confidential or proprietary information
> > intended only for the use of the
> > >> addressee(s) named above or may contain information that is legally
> > privileged. If you are
> > >> not the intended addressee, or the person responsible for
> > >> delivering it
> > to the intended addressee,
> > >> you are hereby notified that reading, disseminating, distributing
> > >> or
> > copying this message is strictly
> > >> prohibited. If you have received this message by mistake, please
> > immediately notify us by
> > >> replying to the message and delete the original message and any
> > >> copies
> > immediately thereafter.
> > >>
> > >> If you received this email as a commercial message and would like
> > >> to
> > opt out of future commercial
> > >> messages, please let us know and we will remove you from our
> > distribution list.
> > >>
> > >> Thank you.~
> > >>
> > **********************************************************************
> > ********************
> > >> FAFLD
> > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> 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