Cannot get JMeter to authenticate against site during recording

Eoin picture Eoin · Sep 20, 2012 · Viewed 9.7k times · Source

I am new to Jmeter and have the following problem. It has wasted a couple of days for me so far and I really hope someone can help:

When I go to record the login page of the website (IIS hosted, Windoes Authentication) I ultimately receive a 401 unauthorized. The login popup shows again after details have been entered. These same details function correctly when browsing to the site without the use of Jmeter.

Situation: Intranet Proxy > JMeter Proxy > Site

I have started JMeter with the Intranet Proxy details:

jmeter -H -P 8080 -u -a -N localhost

I have created a HTTP Proxy Server in the WorkBench within JMeter

HTTP Sampler Settings = HttpClient 3.1 / Redirect / Follow and Keep Alive

I have added a HTTP Authorization Manager to the Thread Group providing my details

I have uncommented httpclient.parameters.file=httpclient.parameters in the jmeter.properties file

I have uncommented http.proxyDomain=NTLM domain, if required by HTTPClient sampler in the same file

I have uncommented http.authentication.preemptive$Boolean=true in the httpclient.parameters file

I believe the NTLM credentials are getting lost somewhere along the way but I do not know where to go at this point.

Let me know if any other information would be of use.

Thanks in advance, Eoin.

Answer

UBIK LOAD PACK picture UBIK LOAD PACK · Sep 20, 2012

If you are behind a proxy which requires authentication, ensure you set this:

  -H PROXY_HOST -P PROXY_PORT -u PROXY_USERNAME -a PROXY_PASSWORD -N localhost

Second check your configuration of JMeter Proxy JMETER PROXY SETUP STEP BY STEP

Finally if you have NTLM, then it's not sure it can work at least not sure during recording, it also depends on your version of NTLM, see this:

See this:

Finally try asking this question on jmeter user mailing list, once you don't get answer, I suggest you put JMeter in DEBUG mode (jmeter.properties) and attach your logs to a BugZilla issue you will open on this (I will look at it as soon as possible).