I have a web application where all the pages/services are secured using Central Authentication Service (CAS) based security. I need to perform a load testing on a page using HTTP POST request but have no idea how to configure HTTP Request Sampler for this POST method having access through security of CAS. I can get the Ticket to get access to the page manually from the browser which is as follows:
https://<server>:<portX>/testweb-cas/oauth2.0/callbackAuthorize?ticket=ST-17-J5jknSbPrU1pQ5vFK0bL-testweb.au
Now I want to set up HTTP POST Request Sampler for :
http://<server>:<portY>/Xyz/pages/details.xhtml
using authorization
from above link.
I haven't used HTTP Request POST sampler before in JMeter, and not really getting the desired output using the available solution.
Easiest way:
Use HTTP Test Script recorder, which records the traffic from the browser and build JMeter Test Plan using
HTTP Sampler
.Another way is, to manually add
HTTP Samplers
to theThread Group
. SelectPost
fromMethod
drop down. Mention the body of the requestBody data
section. AddHTTP Header Manager
if you want to add Headers to the request, likeAuthorization
header.Note: Don't take
Authorization
value manually by visiting the browser. Record the navigation, so HTTP Sampler will be added for that request. AddRegular Expression Extractor
to retrieve Authorization value from the response and store it in a variable, so that you can use it in the POST request.Note: Add
HTTP Cookie Manager
(if not already added during recording) so that JMeter automatically takes care of Cookie based authentication.References: