I am trying to load test an AJAX application with cas log in.

I recorded and played back the script; I saw user info in log just after recording it and playing back, but as soon as I closed HNX and opened and re-ran it, user info did not get logged. I cannot see the screens.

Do I need to write regular expression? How?

I tried to create one for SAMLart but it does not work. I guess I do know how to use that.

  • post data:

    username    rejtest%40yahoo.com   
    password    test    
    lt  _cAA03ADBD-A5E9-A726-3A19-93CCC52F7A71_kCE7B79E9-E548-B1E4-6059-E8867FAEA883    
  • get after the post in second node:

    TARGET  http%3A%2F%2Fissvmdevh.ibi.com%2FeventRegistration%2Flabs%2FlabRegistration.seam        
    SAMLart AAJ4q%2BUyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM%3D    
  • request:

    GET http://issvmdevh.ibi.com/eventRegistration/labs/labRegistration.seam?TARGET=http%3A%2F%2Fissvmdevh.ibi.com%2FeventRegistration%2Flabs%2FlabRegistration.seam&SAMLart=AAJ4q%2BUyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM%3D
  • response data:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <title>Sun GlassFish Enterprise Server v2.1.1 - Error report</title>
        <style type="text/css">
            <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}-->
        <h1>HTTP Status 500 - </h1>
            <b>type</b> Exception report</p>
            <b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p>
            <pre>javax.servlet.ServletException: org.jasig.cas.client.validation.TicketValidationException: org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
            <b>root cause</b>
            <pre>org.jasig.cas.client.validation.TicketValidationException: org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
            <b>root cause</b>
            <pre>org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
            <u>The full stack traces of the exception and its root causes are available in the Sun GlassFish Enterprise Server v2.1.1 logs.</u>
        <h3>Sun GlassFish Enterprise Server v2.1.1</h3>

2 Answers 2


Have you added an HTTP Cookie Manager?

Without one of these JMeter will not store any cookie information after you have logged in so your next request will not be as an authenticated user.

To add an HTTP Cookie Manager:

Right click on Test Plan
Select Add -> Config Element -> HTTP Coookie Manager

That all being said an HTTP 500 error implies something has gone wrong on the server side, it is quite possible you have just managed to overload it :)


JMeter doesn't support JavaScript/Ajax applications as it doesn't include JavaScript engine. So that's the main reason. You may add Cookie Manager and try to re-run your test, but it doesn't guarantee that you can login.

In your request body you are using dynamic values and that's why it may work first time after recording with Proxy Server. But you can login till your session is active.


  • Avoid AJAX and try to send XHR requests, sure if it's supported without unique values.
  • Ask developers to create test methods for load testing. Where you can pass login/passwd and get authentificated with cookie.
  • Use WebDriver sampler

    • WebSriver sampler works perfect with Ajax but lauching each thread opens browser instance. So with WebDriver sampler you need more memory than usual case.
  • Parse session and pass to threads.

    • You can share JSESSION between thread and generate uniq IDs. Note that you need basic JMeter skills to write as it's little bit complex. And your Jmeter script should not be functional test, as main point is to load your server. If you choose this way, try to tune up your JMeter script as you have use a lot elements in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.