Bug 42674 - HTTP Authorization Manager does not work with jmeter 2.2 for a test plan working with jmeter 2.1
HTTP Authorization Manager does not work with jmeter 2.2 for a test plan work...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
Nightly (Please specify date)
PC Windows XP
: P2 blocker (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-06-15 06:05 UTC by Raghuveer Sribhashyam
Modified: 2007-06-29 12:57 UTC (History)
0 users



Attachments
Test Plan for Jmeter 2.1 (199.95 KB, application/octet-stream)
2007-06-15 06:07 UTC, Raghuveer Sribhashyam
Details
Test Plan for Jmeter 2.2 (7.20 KB, application/octet-stream)
2007-06-15 06:08 UTC, Raghuveer Sribhashyam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghuveer Sribhashyam 2007-06-15 06:05:00 UTC
Hi,

Following is my problem scenario:

1. I have a web service deployed in web logic server on a Solaris machine.
2. There are web logic user groups created to restrict the web services being
used by a specific user.
3. These groups have a user name and a password.

To fire requests using jmeter(From a Windows XP PC), i added a HTTP
Authorisation Manager with the following fields:
Base URL : {my web services URL}
User Name : {username for my group on weblogic}
Password : {password for my group on weblogic}

With this setting am able to fire requests to my web services using jmeter 2.1
But when i try to use jmeter 2.2 ( the latest nightly build dated 11/06/2007), i
have a problem. ( It doesn't work with any of the 2.2 builds till now including
the stable version)

When i have Base URL, Username and Password as it was in jmeter 2.1 it gives me
a "401 Unauthorized" error message.
I never gave any domain in jmeter 2.1.

I have tried giving the domain also in jmeter 2.2.
I gave the domain to be

1. My Network Domain
2. Web Logic Server Domain.

But neither worked. It even doesn't work with a blank domain.

This is very important to me to be working on Jmeter 2.2 as i have to use XPATH
extractor as well in my test scripts.

I have the following structure for my test plan.

Test Plan
|----Thread Group
     |----SOAP/XML-RPC Request
          |----Response Assertion
|----View Results in Tree
|----HTTP Authorization Manager

Following are the required information to test the same.

For SOAP/XML-RPC Request :
1. URL : http://192.65.219.57/DnPWS/DNPWS
2. Request Data :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:prof="http://bt21st.bt.com.sep/Profile" xmlns:java="java:sep.com.bt.prf.data">
   <soapenv:Header/>
   <soapenv:Body>
      <prof:getUserAddress>
         <prof:RequestSystemCd>SDP</prof:RequestSystemCd>
         <prof:userSearchCriteria>
            <java:categoryCd>ADDRESS</java:categoryCd>
            <java:identifierDomain>FVC</java:identifierDomain>
            <java:identifierValue>JMETER-TEST-USER-ERIC</java:identifierValue>
            <java:universalId></java:universalId>
         </prof:userSearchCriteria>
      </prof:getUserAddress>
   </soapenv:Body>
</soapenv:Envelope>

For HTTP Authorization Manager :

1. Base URL : http://192.65.219.57/DnPWS/DNPWS
2. User Name : jmeteruser
3. Password : jm3t3rus3r

I can upload the test plan i have created, if you can guide me where i can
upload them.

Also can you let me know how to check the status of this bug.

Thanks in anticipation.

Raghuveer Sribhashyam
Comment 1 Raghuveer Sribhashyam 2007-06-15 06:07:31 UTC
Created attachment 20353 [details]
Test Plan for Jmeter 2.1

I have created different Test Plans with same structure for 2.1 and 2.2 as a
jmx file opened with 2.2 doesnot open back in 2.1.
This is the test plan for 2.1. Will attach the 2.2 test plan as well.
Comment 2 Raghuveer Sribhashyam 2007-06-15 06:08:30 UTC
Created attachment 20354 [details]
Test Plan for Jmeter 2.2

I have created different Test Plans with same structure for 2.1 and 2.2 as a
jmx file opened with 2.2 doesnot open back in 2.1.
This is the test plan for 2.2. Also attached the test plan for 2.1. Its in the
previous attachment.
Comment 3 Sebb 2007-06-22 11:42:03 UTC
Try putting the User Defined Variables before the HTTP Authorization Manager.
Does this help?

[The reason the 2.1 test plan does not load in 2.2 is that 2.1 saved the 
formatter if the time format was set to anything other than none or ms. The 
formatter cannot be reloaded, and causes the error. I'll see if I can fix it 
so that the formatter is ignored.]
Comment 4 Sebb 2007-06-26 14:46:13 UTC
I've fixed JMeter so that the formatter is ignored (if present). This will 
appear in the next release of JMeter.
Comment 5 Raghuveer Sribhashyam 2007-06-27 10:23:35 UTC
(In reply to comment #3)
> Try putting the User Defined Variables before the HTTP Authorization Manager.
> Does this help?
> 
> [The reason the 2.1 test plan does not load in 2.2 is that 2.1 saved the 
> formatter if the time format was set to anything other than none or ms. The 
> formatter cannot be reloaded, and causes the error. I'll see if I can fix it 
> so that the formatter is ignored.]

I have tried the suggestion you have suggested. But having User defined
Variables before HTTP Authorization Manager does not work.

Do you need some more information?
Comment 6 Sebb 2007-06-27 17:45:35 UTC
It looks like the Authorisation is being picked up correctly and saved with 
the connection.

The problem is that the server requires pre-emptive authentication - it is not 
generating a WWW-Authenticate response to which Httpclient can reply.

To enable pre-emptive authentication, change the files below to add:

jmeter.properties:
httpclient.parameters.file=httpclient.parameters

httpclient.parameters:
http.authentication.preemptive$Boolean=true

Does this fix the problem?
Comment 7 Raghuveer Sribhashyam 2007-06-29 08:53:26 UTC
(In reply to comment #6)
> It looks like the Authorisation is being picked up correctly and saved with 
> the connection.
> 
> The problem is that the server requires pre-emptive authentication - it is not 
> generating a WWW-Authenticate response to which Httpclient can reply.
> 
> To enable pre-emptive authentication, change the files below to add:
> 
> jmeter.properties:
> httpclient.parameters.file=httpclient.parameters
> 
> httpclient.parameters:
> http.authentication.preemptive$Boolean=true
> 
> Does this fix the problem?

Hi Sebb,

This solution fixes the problem.
But i suggest this to be the default behaviour for the next version of jmeter.

Raghuveer
Comment 8 Sebb 2007-06-29 09:34:11 UTC
Sounds like a good idea to make it the default, but then HttpClient complains 
if there are no credentials. This needs further thought.
Comment 9 Sebb 2007-06-29 12:57:02 UTC
The code has now been fixed so that pre-emptive authentication is used if:
- there are some credentials
- the pre-emptive setting has not been defined
This is in SVN r552013.