How to test CAS with jmeter?

From the first response, can use Regular Expression Extractor to extract ticke and lt. extract ticket

Then send the second request with parameter:

username/password/It/execution/_eventId/_eventId enter image description here

By the way, you should add HTTP Cookie Manager, enter image description here


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. with XPath Extractor or Regular Expression Extractor),

    • the XPath expression would be something like .//*[@id='fm1']//*[@name='execution']/@value
  • add _eventId=submit parameter,

  • the lt parameter (the login ticket) should be extracted from the login form, too - it changes each time; see XPath Extractor or Regular Expression Extractor,

    • XPath expression: .//*[@id='fm1']//*[@name='lt']/@value,
  • not required, but will look nicer - change GET to POST.