JMeter test for Cas Log into AJAX application



  • 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">
      <html>
      <head>
          <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;}-->
          </style>
      </head>
      <body>
          <h1>HTTP Status 500 - </h1>
          <hr/>
          <p>
              <b>type</b> Exception report</p>
          <p>
              <b>message</b>
          </p>
          <p>
              <b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p>
          <p>
              <b>exception</b>
              <pre>javax.servlet.ServletException: org.jasig.cas.client.validation.TicketValidationException: org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
          </p>
          <p>
              <b>root cause</b>
              <pre>org.jasig.cas.client.validation.TicketValidationException: org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
          </p>
          <p>
              <b>root cause</b>
              <pre>org.opensaml.SAMLException: ticket 'AAJ4q+UyBkNH6gSbUUfxVtpWchDNEGh0dHBzOi8vbG9jYWxob3N0Ojg0NDM=' not recognized</pre>
          </p>
          <p>
              <b>note</b>
              <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>
          </p>
          <hr/>
          <h3>Sun GlassFish Enterprise Server v2.1.1</h3>
      </body>
      </html>
      


  • 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 🙂


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2