Re: Clear authentication credentials

2011-12-14 Thread sasidharsmit
Hi Shmuel,
Keep alive is already disabled.

Regards,
Sasidhar Sekar

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/Clear-authentication-credentials-tp5074116p5074366.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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



Clear authentication credentials

2011-12-14 Thread sasidharsmit
Dear All,
I have a test plan, that has 2 samplers.

1. Open Session
2. Close Session

The application that I'm testing is a webservice and I'm using SOAP/XML-RPC
samplers.

The application authenticates the user via DIGESTauthentication. So, I add
the "Authorization Manager" config element to enable authorization.

Open Session opens a session and returns a session id. I pass this session
id to Close Session, along with the same user's authentication credentials
and Close Session, closes this session.

There is one "Authorization Manager" per sampler, so that both the samplers
use the same credentials, within one iteration (i.e.) if Open Session reads
line 1 of "UserDetails.csv", Close Session also reads line 1 of
"UserDetails.csv"

This is what happens when I run the test plan:

1. Open Session finishes successfully
2. Authentication credentials passed are as expected
3. Close Session ends in failure
4. The error message says "No such session exists"

The following are some actions I took to *debug *the test plan: 
   

1. I added a cookie manager to see if it makes any difference. It does not.
With or without cookies, I get the same result.

2. I have no way to check what is the credential that is being passed in to
Close Session, because the credentials are encrypted and even the server
logs do not reveal which session is closed

3. So, I removed all users but one from my "UserDetails.csv" file, which is
being used by the "Authorization Manager". So, now the same use that is
being used for Open Session should be used for Close Session.

4. Still, I get a "No such session" exception

5. Next step, instead of using "UserDetails.csv" for Close Session
"Authorization Manager", I decided to pass the credentials from Open Session
to Close Session (i.e.) the same user which will be used for Open Session
will be passed to a parameter, which will be used by the close Session
"Authorization Manager"

6. This also throws "No such session" exception

7. In the end, I decided to do step 5 using a file (i.e.)the same user which
will be used for Open Session will be written to a file, which will be read
by a beanshell preprocessor in close Session and used by the close Session
"Authorization Manager"

8. This also throws "No such session" exception


*Turning point:*


1. Now, I disabled Close Session and ran only Open Session

2. I copied the session id and pasted it in close session request

3. Now, I disabled open session and ran only close session (no cookies
passed)

4. IT WORKED!!

So, if I terminate the testtplan after open session and use the same session
id in the close session request (in a new run), then it works.
But, if I pass the session id within the same run and try to close the
session, it doesnot work. It throws a "No such session" exception

I thought may be it takes time, for the session id to be synchronized with
the DB. So, I gave a constant timer of around 10 sec in between the samplers
and tried again. No luck. It fails.

I believe that this is a problem with the way, the authorization credentials
are being passed in to the request for close session.

Is there a way to clear the authorization credentials before I start the
close session? 

I saw in the source code for "AuthManager" class within the package
"org.apache.jmeter.protocol.http.control", that there is a *clear()* method.
Can this help?
 How do I use this to clear the credentials?

I tried the below code:

/
package org.apache.jmeter.protocol.http.control;
AuthManager am = new AuthManager();
am.clear();/

It didn't work.

Any suggestions?

Thanks and Regards,
Sasidhar Sekar


--
View this message in context: 
http://jmeter.512774.n5.nabble.com/Clear-authentication-credentials-tp5074116p5074116.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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



Re: JMeter reporting higher response times

2011-11-16 Thread sasidharsmit
Got my issue resolved.
For anyone using the jmeter plugins from the below URL:
http://code.google.com/p/jmeter-plugins/

"jp@gc - HTTP Raw Request" sampler does not support "Connection:
Keep-Alive". So, changing the header to "Connection: close" resolved my
issue.

Disabling Keep-Alive has its own implications. So, please understand the
implications before making this change.

Cheers,
Sasidhar Sekar

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/JMeter-reporting-higher-response-times-tp4994460p4997473.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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



Re: JMeter reporting higher response times

2011-11-15 Thread sasidharsmit
I disabled everything other than the actual sampler. Still, the response time
is over 2000 ms. PF attached the screenshot.

http://jmeter.512774.n5.nabble.com/file/n4994555/jmeter_only_sampler.png
jmeter_only_sampler.png 

Regards,
Sasidhar Sekar

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/JMeter-reporting-higher-response-times-tp4994460p4994555.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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



JMeter reporting higher response times

2011-11-15 Thread sasidharsmit
Dear All,
I'm using JMeter v2.5.1 r1177103 to automate one of my business flows, in a
windows 7 machine. The sampler I use is a custom plugin sampler "jp@gc -
HTTP Raw Request", that I downloaded from the below URL.

http://code.google.com/p/jmeter-plugins/

The business flow is simple. 
   a) I send a http raw request (requesting account details for a particular
user) and 
   b) I expect a response (with the details of the user). 

I have completed automating the application and my script completes the flow
successfully. I get the response I expect and no errors are observed.

Everything is fine, except that JMeter is reporting response times higher
than what I observe with any other performance testing tool. 

I have tried automating the same business flow via the following tools:

1. HTTP Requester
2. HP Performance Center
3. JMeter

The response times I get via the first two tools, are similar, around 40 ms,
on an average. But the response times observed via JMeter is just over 2000
ms (for every sample).

I'm running the test from my local desktop for a single user, in all 3
cases. The network capacity and the  server capacity are the same in all 3
cases.

I have tried executing the tests with each of these 3 tools several times
and yet get the same kind of result. I doubt that there is something wrong
with the way I've designed my JMeter test plan.

I have attached the screenshots of JMeter and HTTP Requester results. As can
be seen in the screenshots,

  a) I have executed 8 tests with HTTP Requester, each returning 518 bytes
of data, and takes around 40 ms
  b) I have executed close to 100 tests with JMeter, each returning 518
bytes of data, and takes over 2000 ms, every time

One point that interests me is the difference between "Load time" and
"Latency" in the JMeter screenshots.
I could see that the latency is around 10-15 ms for each of the samples but
the load time is over 2000 ms in each sample. And, when I minus the latency
from the load time, almost every time I get a value of around 1998-2000 ms.

I do not know, exactly, what this means. But I doubt that the load time
includes some constant time which results in such high response times.

Can any of you help me find the problem area?

http://jmeter.512774.n5.nabble.com/file/n4994460/httprequestor_screenshot.png
httprequestor_screenshot.png 
http://jmeter.512774.n5.nabble.com/file/n4994460/jmeter_screenshot.png
jmeter_screenshot.png 

Thanks and Regards,
Sasidhar Sekar


--
View this message in context: 
http://jmeter.512774.n5.nabble.com/JMeter-reporting-higher-response-times-tp4994460p4994460.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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