Fwd: JavaSampler, complex response processing

2004-06-03 Thread Axel Faltin
Hi List,

Unfortunately nobody responded so far. I guess my mail was too
complicated in the first place. Let's try it step by step:

How do I fill a SampleResult wisely in the case of a complex answer
structure. I would love to return my own object, which is not
possible I guess so I need to wrap it up in the SampleResult and
extract it via a PostRegex.

Any Ideas? My original Question is further down for reference.

cheers,
Axel


===8=== Original Nachrichtentext ===
Hi all,

I have some difficulties putting together a testplan for a EJB
Interface Test.

My Setup:
---
J2EE Container with a couple of Stateless Session Bean.

I would like to call the first (login) which comes back with the
sessionid and do a second, third, etc call using that sessionid.

---

I am not quite sure how to fill the SampleResult wisely. Especially
when I want to give back a complex Result. Concret my second Sample
would produce a List of a comlex result structure (list of business
items) and I need to pull some values out of the result within the Testplan.

Does anybody can give a example how to fill the SampleResult if the
Result is a somewhat complex structure in this case a list of
entities.

How do I use the following methods in this case of a JavaSampler?

 void setContentType(String string)
 void setDataEncoding(String dataEncoding)
 void setDataType(String dataType)
 void setRequestHeaders(String string)
 void setResponseCode(String code)
 void setResponseData(byte[] response)
 void setResponseHeaders(String string)
 void setResponseMessage(String msg)
 void setSampleLabel(String label)
 void setSamplerData(String s) 
 
On which part of the result does the postprocessor work to pull out
the values using regexs?

Thank you very much for you help.

Cheers,
Axel
===8== Ende des Original Nachrichtentextes =


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fwd: JavaSampler, complex response processing

2004-06-03 Thread peter lin
hi Axel,
 
 
you're probably going to have to extend SampleResult, or try to wedge it into the 
existing one. Are you planning on using a local interface to call the EJB or do a real 
remote call?
 
if you're goal is to measure how long it takes to get data, you probably should be 
using local interface to get the data. In that case, you can just use the built in 
timer. If you want to view the data, you're going to have to either pass the bytes, 
convert to string, or extend SampleResult to take an object for the response data.
 
a bit more information about the goal of your test would make it easier to provide 
useful suggestions :)
 
peter
 

Axel Faltin [EMAIL PROTECTED] wrote:
Hi List,

Unfortunately nobody responded so far. I guess my mail was too
complicated in the first place. Let's try it step by step:

How do I fill a SampleResult wisely in the case of a complex answer
structure. I would love to return my own object, which is not
possible I guess so I need to wrap it up in the SampleResult and
extract it via a PostRegex.

Any Ideas? My original Question is further down for reference.

cheers,
Axel


===8=== Original Nachrichtentext ===
Hi all,

I have some difficulties putting together a testplan for a EJB
Interface Test.

My Setup:
---
J2EE Container with a couple of Stateless Session Bean.

I would like to call the first (login) which comes back with the
sessionid and do a second, third, etc call using that sessionid.

---

I am not quite sure how to fill the SampleResult wisely. Especially
when I want to give back a complex Result. Concret my second Sample
would produce a List of a comlex result structure (list of business
items) and I need to pull some values out of the result within the Testplan.

Does anybody can give a example how to fill the SampleResult if the
Result is a somewhat complex structure in this case a list of
entities.

How do I use the following methods in this case of a JavaSampler?

void setContentType(String string)
void setDataEncoding(String dataEncoding)
void setDataType(String dataType)
void setRequestHeaders(String string)
void setResponseCode(String code)
void setResponseData(byte[] response)
void setResponseHeaders(String string)
void setResponseMessage(String msg)
void setSampleLabel(String label)
void setSamplerData(String s) 

On which part of the result does the postprocessor work to pull out
the values using regexs?

Thank you very much for you help.

Cheers,
Axel
===8== Ende des Original Nachrichtentextes =


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

Re[2]: Fwd: JavaSampler, complex response processing

2004-06-03 Thread Axel Faltin
Hi,
 
 you're probably going to have to extend SampleResult, or try to
 wedge it into the existing one. Are you planning on using a local
 interface to call the EJB or do a real remote call?

1. In the case I extend SampleResult (lets say AxelSampleResult), which would be fine 
with me. How
do I convince the framework to pull out the data of my specific
AxelSampleResult?

2. I do use a local interface in the Sampler. I do the whole JNDI
Lookup and Cast in the Setup and call my EJB, that does work fine so
far.
 
 if you're goal is to measure how long it takes to get data, you
 probably should be using local interface to get the data. In that
 case, you can just use the built in timer. If you want to view the
 data, you're going to have to either pass the bytes, convert to
 string, or extend SampleResult to take an object for the response
 data.

I am trying to use tha data from the first call and put it as input in
the second. Like this:

1. First Call: SearchForSomething -- SearchResult
2. Second Call: DoSomething use some values from SearchResult

Using that I would like to simulate a whole UserSession. Somebody
logs in, is doing a search and is modifying one Resultset using the
next funktionality, etc.

 a bit more information about the goal of your test would make it
 easier to provide useful suggestions :)

Does that help helping :-)

Cheers,
Ax
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re[2]: Fwd: JavaSampler, complex response processing

2004-06-03 Thread peter lin
 
that definitely gives me a better idea, but I'm afraid there isn't a simple solution 
to your specific problem.

Axel Faltin [EMAIL PROTECTED] wrote:

Hi,

 you're probably going to have to extend SampleResult, or try to
 wedge it into the existing one. Are you planning on using a local
 interface to call the EJB or do a real remote call?

1. In the case I extend SampleResult (lets say AxelSampleResult), which would be fine 
with me. How
do I convince the framework to pull out the data of my specific
AxelSampleResult?


well you're going to have to write a specific visualizer to pull out the data. the 
stock components expect to get the data from either byte or string.


2. I do use a local interface in the Sampler. I do the whole JNDI
Lookup and Cast in the Setup and call my EJB, that does work fine so
far.


 if you're goal is to measure how long it takes to get data, you
 probably should be using local interface to get the data. In that
 case, you can just use the built in timer. If you want to view the
 data, you're going to have to either pass the bytes, convert to
 string, or extend SampleResult to take an object for the response
 data.

I am trying to use tha data from the first call and put it as input in
the second. Like this:

1. First Call: SearchForSomething -- SearchResult
2. Second Call: DoSomething use some values from SearchResult

Using that I would like to simulate a whole UserSession. Somebody
logs in, is doing a search and is modifying one Resultset using the
next funktionality, etc.


Ok, this is going to be hard. If your sample converts the EJB session information into 
HttpSession data, then you would be ok. Otherwise you'd have to write a custom 
configuration element to handle EJB related session data.


 a bit more information about the goal of your test would make it
 easier to provide useful suggestions :)

Does that help helping :-)

Cheers,

 

testing EJB's can be a bit of a pain. If you read the latest threads on 
theServerside.com, you'll lots of people complaining about how hard it is to test EJB 
effectively. It can be done, but it's not easy or painless.  I hope that helps provide 
some useful answers.

 

peter 


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

Re: Re[2]: Fwd: JavaSampler, complex response processing

2004-06-03 Thread peter lin
 
have you read this article?
 
http://www.javaworld.com/javaworld/jw-05-2000/jw-0526-testinfect.html
 
other people have come across this problem and there are JUnit based approaches to 
testing EJB that may be more suitable for your needs. good luck.
 
peter 

 

-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

RE: Fwd: JavaSampler, complex response processing

2004-06-03 Thread BAZLEY, Sebastian
Note that the BeanShell Sampler has access to all the methods you mention,
and might be a good way to prototype the sampler.

The regex Assertion can act on various different fields by selecting the
appropriate radio button. If you want to try them out, the Java sampler
allows one to specify the values of most of the sample fields directly
(except the elapsed time).

S
-Original Message-
From: peter lin [mailto:[EMAIL PROTECTED]
Sent: 03 June 2004 13:59
To: JMeter Users List; Axel Faltin
Subject: Re: Fwd: JavaSampler, complex response processing


hi Axel,
 
 
you're probably going to have to extend SampleResult, or try to wedge it
into the existing one. Are you planning on using a local interface to call
the EJB or do a real remote call?
 
if you're goal is to measure how long it takes to get data, you probably
should be using local interface to get the data. In that case, you can just
use the built in timer. If you want to view the data, you're going to have
to either pass the bytes, convert to string, or extend SampleResult to take
an object for the response data.
 
a bit more information about the goal of your test would make it easier to
provide useful suggestions :)
 
peter
 

Axel Faltin [EMAIL PROTECTED] wrote:
Hi List,

Unfortunately nobody responded so far. I guess my mail was too
complicated in the first place. Let's try it step by step:

How do I fill a SampleResult wisely in the case of a complex answer
structure. I would love to return my own object, which is not
possible I guess so I need to wrap it up in the SampleResult and
extract it via a PostRegex.

Any Ideas? My original Question is further down for reference.

cheers,
Axel


===8=== Original Nachrichtentext ===
Hi all,

I have some difficulties putting together a testplan for a EJB
Interface Test.

My Setup:
---
J2EE Container with a couple of Stateless Session Bean.

I would like to call the first (login) which comes back with the
sessionid and do a second, third, etc call using that sessionid.

---

I am not quite sure how to fill the SampleResult wisely. Especially
when I want to give back a complex Result. Concret my second Sample
would produce a List of a comlex result structure (list of business
items) and I need to pull some values out of the result within the Testplan.

Does anybody can give a example how to fill the SampleResult if the
Result is a somewhat complex structure in this case a list of
entities.

How do I use the following methods in this case of a JavaSampler?

void setContentType(String string)
void setDataEncoding(String dataEncoding)
void setDataType(String dataType)
void setRequestHeaders(String string)
void setResponseCode(String code)
void setResponseData(byte[] response)
void setResponseHeaders(String string)
void setResponseMessage(String msg)
void setSampleLabel(String label)
void setSamplerData(String s) 

On which part of the result does the postprocessor work to pull out
the values using regexs?

Thank you very much for you help.

Cheers,
Axel
===8== Ende des Original Nachrichtentextes =


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger


___

This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. 
___


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JavaSampler, complex response processing

2004-05-25 Thread Axel Faltin
Hi all,

I have some difficulties putting together a testplan for a EJB
Interface Test.

My Setup:
---
J2EE Container with a couple of Stateless Session Bean.

I would like to call the first (login) which comes back with the
sessionid and do a second, third, etc call using that sessionid.

---

I am not quite sure how to fill the SampleResult wisely. Especially
when I want to give back a complex Result. Concret my second Sample
would produce a List of a comlex result structure (list of business
items) and I need to pull some values out of the result within the Testplan.

Does anybody can give a example how to fill the SampleResult if the
Result is a somewhat complex structure in this case a list of
entities.

How do I use the following methods in this case of a JavaSampler?

 void setContentType(String string)
 void setDataEncoding(String dataEncoding)
 void setDataType(String dataType)
 void setRequestHeaders(String string)
 void setResponseCode(String code)
 void setResponseData(byte[] response)
 void setResponseHeaders(String string)
 void setResponseMessage(String msg)
 void setSampleLabel(String label)
 void setSamplerData(String s) 
 
On which part of the result does the postprocessor work to pull out
the values using regexs?

Thank you very much for you help.

Cheers,
Axel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]