You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by o haya <oh...@yahoo.com.INVALID> on 2015/11/15 15:48:18 UTC

Followup question was Re: Solved, I think was Re: How to step through users in the HTTP Authorization Manager during test?

Hi,
I wanted to see what would happen if the CSV file had some invalid users and/or credentials in it, so I had something like:
usernm,passwdgooduser1,pwd1gooduser2,pwd2baduser3,pwd3
I also added an HTTP Header manager that sets a header named "myheader" to ${usernm} so that the requests would have the username in a header (to help see which user was being used).
Then, I did a jmeter run, and I have a sniffer on the target, and, on the requests where it tries to use/authenticate "baduser3", I can see the unauthorized, but then, in the same connection, it then does another handshake using the next user in the CSV, e.g., gooduser1.  That latter authentication succeeds, so then the content gets served.
In other words, when it hits a bad user or credential, it does automatically does a retry using the next user in the CSV.  
I have the "clear auth on each iteration" checked, which I had assumed meant that if there was a failure to authenticate, that would cause the whole request to be logged as an error in Jmeter?
Is there a way, while using the Authorization Manager together with the CSV config, to have Jmeter mark the authentications that fail as failures, rather than doing retries from the subsequent users/credentials in the CSV?
Thanks,Jim
      From: o haya <oh...@yahoo.com.INVALID>
 To: JMeter Users List <us...@jmeter.apache.org>; Steven Swor <sw...@gmail.com>; o haya <oh...@yahoo.com> 
 Sent: Sunday, November 15, 2015 12:19 AM
 Subject: Solved, I think was Re: How to step through users in the HTTP Authorization Manager during test?
   
Hi,
I think I was able to just get this working.  In order to do that I had to:
a) Set in httpclient.parameters:
http.authentication.preemptive$Boolean=true

(I think that was default)
and:
b) Set "Implementation" to HTTPClient 4

Now, it seems to be rotating through and authenticating with the users in the CSV file.
Jim
      From: o haya <oh...@yahoo.com.INVALID>


 To: Steven Swor <sw...@gmail.com>; JMeter Users List <us...@jmeter.apache.org> 
 Sent: Saturday, November 14, 2015 11:56 PM
 Subject: Re: How to step through users in the HTTP Authorization Manager during test?
  
Hi,
I have tried that.
1) I created a CSV file with:
username1,password1username2,password2
2) I added CSV data set config with:
variables: USERNAME,PASSWORD
3) In the HTTP Authorization Manager, I have one row with mechanism set to BASIC DIGEST, and I set the
Username to ${USERNAME}Password to ${PASSWORD}

Then, I run the test plan, and I have a sniffer on the server-side and it looks like all the authentication requests are for username2 with password2.
In other words, it doesn't seem to be rotating through the users in the CSV file?

Actually, I'm not sure if it's even using the CSV file at this point.  The reason that I say this is that is that I did another test where I modified the CSV file to have garbage username and passwords in it, then I re-ran the jmeter test, and I still got successful authentication, so at this point, I'm really confused.  
Also, one other piece of data:  I can only get the authentication to be successful if I set the implementation to Java (vs. HTTPclient 3.1 or 4), but when I do that, I cannot seem to get it to fail authentication at all.

Sorry if this is all confusing :(!!
jIM
 

    From: Steven Swor <sw...@gmail.com>


 To: JMeter Users List <us...@jmeter.apache.org>; o haya <oh...@yahoo.com> 
 Sent: Saturday, November 14, 2015 7:15 PM
 Subject: Re: How to step through users in the HTTP Authorization Manager during test?
  
Hi Jim,

The simplest way do do what you're asking is to use the CSV data set config (https://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config).
-Steve



On Sun, Nov 15, 2015 at 8:18 AM, o haya <oh...@yahoo.com.invalid> wrote:

Hi,

I have a test plan where I have an HTTP Request step where do a BASIC Digest authentication.  I've configured an Authorization Manager with a set of users (with usernames, passwords) and I'd like to run a test where it authenticates the users in the set of users, rotating through the set of users until the test is done.

How can I do that?


I had originally assumed that if I had the set of users in the Authorization Manager that that would automatically do that, but it seems like it's only using the first user in the Authorization Manager.

Thanks,
Jim

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