Got it , Certain header fields were missing with initial queries:

reason for failing -- > Did not record the test plan by turning on the "Live HTTP Headers" Option , When i recorded the test plan again with the check on this feature it recorded all the fields for me in seperate HTTP Header manager config element for me. Just ported the recorded test plan into my test plan under the desired the thread group.

It is tedious to add individual header for different POST requests and to make sure that all are added. Proxy recorder served very good purpose in this regard.

Ran the test with the presence of HTTP Header managers in all the samplers and everything was working fine when viewed the results in the Tree listener.

Thanks to Sebb and Deepak for giving clues on using this.

Thanks
Jatin

Ronan Klyne wrote:
Hi Jatin,

I can see two problems:
1) You use "Content-Type: application/x-www-form-urlencoded" when you are posting XML data - use application/xml or text/xml. It's probably worth including the charset too. 2) (Maybe a problem) If this is meant to be a SOAP request, then you will probably need a SOAPAction header.

If those don't fix it, I'd look advise looking at the Coyote error logs to see what it thinks the problem is.


Ronan

Jatin Davey wrote:
Hi

I read the article as pointed. I did follow some steps in working with Live HTTP Headers and seeing what is present in the Tree listener with my Post requests. Here go my observations:

Tree Listener Results
---------------------
Thread Name: Thread Group 1-1
Sample Start: 2009-10-07 17:32:44 IST
Load time: 1326
Latency: 1326
Size in bytes: 551
Sample Count: 1
Error Count: 1
Response code: 500
Response message: Internal Server Error

Response headers:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 07 Oct 2009 12:00:45 GMT
Connection: close


HTTPSampleResult fields:
ContentType: text/xml;charset=utf-8
DataEncoding: utf-8


Live HTTP Headers Output:
-----------------------------

POST /ui/services/CustomerMgmtService HTTP/1.1
Host: ip-address of the host
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: JSESSIONID=B8F32AA72126055D22E99E4FD85237E8
Referer: https://172.20.106.10/ui/app/main.swf
Content-type: text/xml; charset=utf-8
SOAPAction: ""
Content-length: 360

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
   <intf:getCustomers xmlns:intf="CustomerMgmtService"/>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.x 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 07 Oct 2009 11:44:50 GMT

Tree Listener Request data:
----------------------------
POST https://ipaddress/sample URL
POST data:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
   <impl:getCustomers xmlns:impl="CustomerMgmtService"/>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Cookie Data:
JSESSIONID=44360250DC6320A8E760C4915BF540B4

Request Headers:
Accept-Language: en-us,en;q=0.5
Content-Length: 360
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: application/x-www-form-urlencoded



Please let me know if i am missing to add any of the headers in my header manager or i am lacking in some thing basic that needs to be added.

Thanks
Jatin

sebb wrote:
On 16/09/2009, Jatin Davey <jasho...@cisco.com> wrote:
Hi

I created a test plan by first recording my actions when i access the Web App that i wanted to test. While the actions were being performed there were
corresponding Samplers being created by the "HTTP Proxy Recorder". The
recorded samplers had both http "GET" and http "POST" requests to the Web App. When i replay this test plan all my http "GET" succeed while the "POST"
requests fail.

Note: My Web app under test works only with HTTPS , Cookies and SessionID's
are getting used as a result of it.

What i am suspecting in the POST failures is that there could be different parameters that need to be used for each different session and it can be
different from the one that i recorded using the HTTP Proxy Recorder.

 Please let me know if i am missing some thing.

Did you add a Cookie Manager?

Also see:

http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour

 Thanks
 Jatin

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



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



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




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



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

Reply via email to