jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbm-r...@gmx.net
Subject Re: jmeter.bat: Special exit code when test plan run fails?
Date Wed, 03 Oct 2007 22:12:05 GMT
Actually, returning an error code in Java is pretty straight forward:

System.exit(123); // or whatever code you want.

All you have to do is agree on the error code(s).

-Rico

-------- Original-Nachricht --------
> Datum: Wed, 3 Oct 2007 22:02:38 +0100
> Von: sebb <sebbaz@gmail.com>
> An: "JMeter Users List" <jmeter-user@jakarta.apache.org>
> Betreff: Re: jmeter.bat: Special exit code when test plan run fails?

> This is a problem with Java applications.
> 
> In general it is very difficult to return a meaningful code from Java
> applications.
> 
> 
> On 03/10/2007, pbm-rico@gmx.net <pbm-rico@gmx.net> wrote:
> > Hi all,
> >
> > I was wondering if there is a special exit code for jmeter.[bat|sh] and
> the like when a test fails.
> >
> > For example if I run this on Windows, the exit code is '0' although some
> tests failed:
> >
> >  c:\jakarta-jmeter-2.3RC4\bin>jmeter.bat -n -t ..\extras\Test.jmx  -l
> shorttest.log
> >  Created the tree successfully
> >  Starting the test @ Wed Oct 03 13:10:00 PDT 2007 (1191442200884)
> >  Tidying up ...    @ Wed Oct 03 13:10:04 PDT 2007 (1191442204589)
> >  ... end of run
> >
> >  c:\jakarta-jmeter-2.3RC4\bin>echo %errorlevel%
> >  0
> >
> > The failure shows up nicely in the HTML report that I can generate with
> the XSLT stylesheet, but it would be extremely helpful if the command would
> return a non-zero exit code if a test fails. This allows me to better
> integrate JMeter in our test automation framework.
> >
> > Thanks in advance,
> > Rico.
> >
> >
> > --
> > Psssst! Schon vom neuen GMX MultiMessenger gehört?
> > Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message