You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Sriram Anandraj .S" <ss...@cisco.com> on 2003/05/23 15:38:09 UTC

Capturing info from my test code !!!

Hi,

I bascially need to capture the following in my java test code

1) Total time taken to receive the response for a request.
2) Size of bytes received.
3) The content received.

I need to get this through my script. Is it only possible to execute jmx file
using Runtime.exec(), or is there any other way.
What are the other informations that can be captured by jmeter ?

Since I need to get those info and report it in my own format, I need a way to
get those datas in my code.
Also the jtl file generated by executing jmx file in non gui mode does not give
the size of bytes received. I thought of parsing the jtl xml file and get the
datas for reporting, but I could see only the 'time' and 'success' parameters
useful  to me. How about getting the size of bytes received. Is there any other
information i can get !!!!

Thanks
Sriram

"BAZLEY, Sebastian" wrote:

> There are a some parts of JMeter 1.8.1 that do not work in batch mode - for
> example ConstantThroughputTimer, which relies on a GUI-only call to do some
> initialisation (I believe that this is now fixed in CVS).
>
> It might be worth trying the latest CVS sources.
>
> Or perhaps you could post (a link to) your JMX file (ideally a minimal
> version that exhibits the problem)?
>
> If there are any remaining problems with batch mode, it would be useful to
> catch them before 1.9 is released.
>
> --
> The opinions expressed herein are my own, and are not necessarily endorsed
> by my employer ...
> -----Original Message-----
> From: Sriram Anandraj .S [mailto:ssaeenat@cisco.com]
> Sent: 23 May 2003 09:51
> To: JMeter Users List
> Subject: Executing jmeter in non gui mode
>
> Hi,
>
> I tried executing jmeter in non gui mode by using the following command
>
> D:\tools\jakarta-jmeter-1.8.1\bin>jmeter -n -t
> d:\tools\jakarta-jmeter-1.8.1\Tes
> ts\test1.jmx -l d:\tools\jakarta-jmeter-1.8.1\Tests\test2.jtl
>
> After executing, I opened the test2.jtl file. The Assertion report shows the
> test
> has failed. I basically send a HttpRequest to the server.
>
> The test passes if I run it in GUI mode. Why is it failing in Non Gui mode?
>
> Thanks
> Sriram
>
> ---------------------------------------------------------------------
> 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


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


Re: Capturing info from my test code !!!

Posted by ms...@apache.org.
Functional testing is turned on in the Test Plan gui element (a checkbox at the bottom).

JMeter always records response time.  Also the timestamp of the request.  Content is 
recorded if you turn on functional testing.  The rest of the info is things like success/failure, 
http response code and response message, sampler request info.  Not sure what else off the 
top of my head.

-Mike

On 23 May 2003 at 19:58, Sriram Anandraj .S wrote:

> Hi Mike,
> 
> Thank You for the quick reply.
> 
> How do u turn on functional testing to make the content log in jtl file ?
> Also is there any other information(time, content and content size) that can be
> captured by jmeter?
> 
> Thanks
> Sriram
> 
> mstover1@apache.org wrote:
> 
> > You say you need the content returned - you would need to turn on functional
> > testing to get that information saved to the .jtl files.  In which case, you could
> > count the bytes yourself :-)
> >
> > Not ideal, but right now JMeter doesn't report number of bytes returned.
> > Would make a useful enhancement, however.
> >
> > -Mike
> >
> > On 23 May 2003 at 19:08, Sriram Anandraj .S wrote:
> >
> > >
> > > Hi,
> > >
> > > I bascially need to capture the following in my java test code
> > >
> > > 1) Total time taken to receive the response for a request.
> > > 2) Size of bytes received.
> > > 3) The content received.
> > >
> > > I need to get this through my script. Is it only possible to execute jmx file
> > > using Runtime.exec(), or is there any other way.
> > > What are the other informations that can be captured by jmeter ?
> > >
> > > Since I need to get those info and report it in my own format, I need a way
> > to
> > > get those datas in my code.
> > > Also the jtl file generated by executing jmx file in non gui mode does not
> > give
> > > the size of bytes received. I thought of parsing the jtl xml file and get the
> > > datas for reporting, but I could see only the 'time' and 'success' parameters
> > > useful  to me. How about getting the size of bytes received. Is there any
> > other
> > > information i can get !!!!
> > >
> > > Thanks
> > > Sriram
> > >
> > > "BAZLEY, Sebastian" wrote:
> > >
> > > > There are a some parts of JMeter 1.8.1 that do not work in batch mode -
> > for
> > > > example ConstantThroughputTimer, which relies on a GUI-only call to do
> > some
> > > > initialisation (I believe that this is now fixed in CVS).
> > > >
> > > > It might be worth trying the latest CVS sources.
> > > >
> > > > Or perhaps you could post (a link to) your JMX file (ideally a minimal
> > > > version that exhibits the problem)?
> > > >
> > > > If there are any remaining problems with batch mode, it would be useful to
> > > > catch them before 1.9 is released.
> > > >
> > > > --
> > > > The opinions expressed herein are my own, and are not necessarily
> > endorsed
> > > > by my employer ...
> > > > -----Original Message-----
> > > > From: Sriram Anandraj .S [mailto:ssaeenat@cisco.com]
> > > > Sent: 23 May 2003 09:51
> > > > To: JMeter Users List
> > > > Subject: Executing jmeter in non gui mode
> > > >
> > > > Hi,
> > > >
> > > > I tried executing jmeter in non gui mode by using the following command
> > > >
> > > > D:\tools\jakarta-jmeter-1.8.1\bin>jmeter -n -t
> > > > d:\tools\jakarta-jmeter-1.8.1\Tes
> > > > ts\test1.jmx -l d:\tools\jakarta-jmeter-1.8.1\Tests\test2.jtl
> > > >
> > > > After executing, I opened the test2.jtl file. The Assertion report shows the
> > > > test
> > > > has failed. I basically send a HttpRequest to the server.
> > > >
> > > > The test passes if I run it in GUI mode. Why is it failing in Non Gui mode?
> > > >
> > > > Thanks
> > > > Sriram
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> >
> > --
> > Michael Stover
> > mstover1@apache.org
> > Yahoo IM: mstover_ya
> > ICQ: 152975688
> > AIM: mstover777
> >
> > ---------------------------------------------------------------------
> > 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
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

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


Re: Capturing info from my test code !!!

Posted by "Sriram Anandraj .S" <ss...@cisco.com>.
Hi Mike,

Thank You for the quick reply.

How do u turn on functional testing to make the content log in jtl file ?
Also is there any other information(time, content and content size) that can be
captured by jmeter?

Thanks
Sriram

mstover1@apache.org wrote:

> You say you need the content returned - you would need to turn on functional
> testing to get that information saved to the .jtl files.  In which case, you could
> count the bytes yourself :-)
>
> Not ideal, but right now JMeter doesn't report number of bytes returned.
> Would make a useful enhancement, however.
>
> -Mike
>
> On 23 May 2003 at 19:08, Sriram Anandraj .S wrote:
>
> >
> > Hi,
> >
> > I bascially need to capture the following in my java test code
> >
> > 1) Total time taken to receive the response for a request.
> > 2) Size of bytes received.
> > 3) The content received.
> >
> > I need to get this through my script. Is it only possible to execute jmx file
> > using Runtime.exec(), or is there any other way.
> > What are the other informations that can be captured by jmeter ?
> >
> > Since I need to get those info and report it in my own format, I need a way
> to
> > get those datas in my code.
> > Also the jtl file generated by executing jmx file in non gui mode does not
> give
> > the size of bytes received. I thought of parsing the jtl xml file and get the
> > datas for reporting, but I could see only the 'time' and 'success' parameters
> > useful  to me. How about getting the size of bytes received. Is there any
> other
> > information i can get !!!!
> >
> > Thanks
> > Sriram
> >
> > "BAZLEY, Sebastian" wrote:
> >
> > > There are a some parts of JMeter 1.8.1 that do not work in batch mode -
> for
> > > example ConstantThroughputTimer, which relies on a GUI-only call to do
> some
> > > initialisation (I believe that this is now fixed in CVS).
> > >
> > > It might be worth trying the latest CVS sources.
> > >
> > > Or perhaps you could post (a link to) your JMX file (ideally a minimal
> > > version that exhibits the problem)?
> > >
> > > If there are any remaining problems with batch mode, it would be useful to
> > > catch them before 1.9 is released.
> > >
> > > --
> > > The opinions expressed herein are my own, and are not necessarily
> endorsed
> > > by my employer ...
> > > -----Original Message-----
> > > From: Sriram Anandraj .S [mailto:ssaeenat@cisco.com]
> > > Sent: 23 May 2003 09:51
> > > To: JMeter Users List
> > > Subject: Executing jmeter in non gui mode
> > >
> > > Hi,
> > >
> > > I tried executing jmeter in non gui mode by using the following command
> > >
> > > D:\tools\jakarta-jmeter-1.8.1\bin>jmeter -n -t
> > > d:\tools\jakarta-jmeter-1.8.1\Tes
> > > ts\test1.jmx -l d:\tools\jakarta-jmeter-1.8.1\Tests\test2.jtl
> > >
> > > After executing, I opened the test2.jtl file. The Assertion report shows the
> > > test
> > > has failed. I basically send a HttpRequest to the server.
> > >
> > > The test passes if I run it in GUI mode. Why is it failing in Non Gui mode?
> > >
> > > Thanks
> > > Sriram
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
> --
> Michael Stover
> mstover1@apache.org
> Yahoo IM: mstover_ya
> ICQ: 152975688
> AIM: mstover777
>
> ---------------------------------------------------------------------
> 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


Re: Capturing info from my test code !!!

Posted by ms...@apache.org.
You say you need the content returned - you would need to turn on functional 
testing to get that information saved to the .jtl files.  In which case, you could 
count the bytes yourself :-)

Not ideal, but right now JMeter doesn't report number of bytes returned.  
Would make a useful enhancement, however.

-Mike

On 23 May 2003 at 19:08, Sriram Anandraj .S wrote:

> 
> Hi,
> 
> I bascially need to capture the following in my java test code
> 
> 1) Total time taken to receive the response for a request.
> 2) Size of bytes received.
> 3) The content received.
> 
> I need to get this through my script. Is it only possible to execute jmx file
> using Runtime.exec(), or is there any other way.
> What are the other informations that can be captured by jmeter ?
> 
> Since I need to get those info and report it in my own format, I need a way 
to
> get those datas in my code.
> Also the jtl file generated by executing jmx file in non gui mode does not 
give
> the size of bytes received. I thought of parsing the jtl xml file and get the
> datas for reporting, but I could see only the 'time' and 'success' parameters
> useful  to me. How about getting the size of bytes received. Is there any 
other
> information i can get !!!!
> 
> Thanks
> Sriram
> 
> "BAZLEY, Sebastian" wrote:
> 
> > There are a some parts of JMeter 1.8.1 that do not work in batch mode - 
for
> > example ConstantThroughputTimer, which relies on a GUI-only call to do 
some
> > initialisation (I believe that this is now fixed in CVS).
> >
> > It might be worth trying the latest CVS sources.
> >
> > Or perhaps you could post (a link to) your JMX file (ideally a minimal
> > version that exhibits the problem)?
> >
> > If there are any remaining problems with batch mode, it would be useful to
> > catch them before 1.9 is released.
> >
> > --
> > The opinions expressed herein are my own, and are not necessarily 
endorsed
> > by my employer ...
> > -----Original Message-----
> > From: Sriram Anandraj .S [mailto:ssaeenat@cisco.com]
> > Sent: 23 May 2003 09:51
> > To: JMeter Users List
> > Subject: Executing jmeter in non gui mode
> >
> > Hi,
> >
> > I tried executing jmeter in non gui mode by using the following command
> >
> > D:\tools\jakarta-jmeter-1.8.1\bin>jmeter -n -t
> > d:\tools\jakarta-jmeter-1.8.1\Tes
> > ts\test1.jmx -l d:\tools\jakarta-jmeter-1.8.1\Tests\test2.jtl
> >
> > After executing, I opened the test2.jtl file. The Assertion report shows the
> > test
> > has failed. I basically send a HttpRequest to the server.
> >
> > The test passes if I run it in GUI mode. Why is it failing in Non Gui mode?
> >
> > Thanks
> > Sriram
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

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