jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shmuel Krakower <shmul...@gmail.com>
Subject Re: Exit code as indicator of (functional) test outcome
Date Thu, 07 Feb 2013 23:50:04 GMT
Good question, I have no idea but maybe one of the developers will tell.

The only thing I know is that in the service below(in my signature) I tend
to KILL the JVM (externally) and I didn't notice any open files left open
or any kind of "leaks"... but you are right, it might not be a clean
solution.

Best,

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Fri, Feb 8, 2013 at 1:40 AM, Mark Miller <mark.o.miller@gmail.com> wrote:

> Thanks Shmuel. I did find that suggestion that you'd made on that thread
> and I experimented with it. It did work. However, I wondered that it might
> be overly 'abrupt' in terms of JMeter exiting and finishing writing other
> listeners (file handling), etc. I have not taken the time to look into
> this, though. The strength of that approach is that it is more portable.
>
> Do you happen to know how JMeter handles it's own termination under a
> System.exit via BeanShell?
>
> Mark
>
>
> On Thu, Feb 7, 2013 at 4:15 PM, Shmuel Krakower <shmulikk@gmail.com>
> wrote:
>
> >
> >
> http://jmeter.512774.n5.nabble.com/exiting-with-an-error-return-code-when-Assertion-Test-fails-td5715096.html
> >
> > ("....you can use the "System.exit(ERROR_CODE);" inside a beanshell
> > sampler.")
> >
> > Shmuel Krakower.
> > www.Beatsoo.org - re-use your jmeter scripts for application performance
> > monitoring from worldwide locations for free.
> >
> >
> > On Thu, Feb 7, 2013 at 9:09 PM, Mark Miller <mark.o.miller@gmail.com>
> > wrote:
> >
> > > I am in the process of integrating *discreet, functional unit
> > > tests*(leveraging several JMeter capabilities) with an enterprise
> > > monitoring
> > > system (Orion). The monitoring system can integrate with any executable
> > > based on exit status.
> > >
> > > I've done some searching and read other threads from folks seemingly
> > > searching for a similar capability.
> > >
> > > I've come up with and successfully tested the following solution and
> > wanted
> > > to float it to the community to ask for feedback or other suggestions:
> > >
> > > In the tesplan, I include a Generate Summary Results listener.
> > > I wrap the execution of JMeter in a simple shell script used to
> evaluate
> > > the string put to stdout by the listener:
> > >
> > > #!/bin/bash
> > > if java -jar ./apache-jmeter-2.9/bin/ApacheJMeter.jar -n -t x.jmx |
> grep
> > "0
> > > (0.00%)$"
> > > then
> > >   echo Success
> > >   exit 0
> > > else
> > >   echo Failure
> > >   exit 1
> > > fi
> > >
> > > I have noted that, in a long running test, Generate Summary Results
> will
> > > output n+ lines over time. But it seems safe that the final line output
> > > terminates ($) with the final overall error rate.
> > >
> > > Anyone have any other cautions / considerations / approaches to this?
> > >
> > > Thank you.
> > >
> > > Mark
> > >
> >
>

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