How to test CAS with jmeter?
From the first response, can use Regular Expression Extractor to extract ticke and lt.
Then send the second request with parameter:
username/password/It/execution/_eventId/_eventId
By the way, you should add HTTP Cookie Manager,
I didnot see parameters of your first request. At least I didnot see the lt.
The second request should be a GET request, and the parameters are: service and ticket(This is not jsessionid, the value is generated by CAS, and it is the same with the parameter lt in the first request to the CAS login ).
There is a few things you need to change in the second request:
add
execution
parameter (extract it from the first request, eg. withXPath Extractor
orRegular Expression Extractor
),- the XPath expression would be something like
.//*[@id='fm1']//*[@name='execution']/@value
- the XPath expression would be something like
add
_eventId=submit
parameter,the
lt
parameter (the login ticket) should be extracted from the login form, too - it changes each time; seeXPath Extractor
orRegular Expression Extractor
,- XPath expression:
.//*[@id='fm1']//*[@name='lt']/@value
,
- XPath expression:
- not required, but will look nicer - change GET to POST.