How to extract atribute value in jMeter



  • How to extract SessionId in jMeter, maybe by using the regular expression extractor?

    Here is my HTML snippet:

    <form name="Form1" method="post" action="./ResolutionStatus.aspx?SessionID=f4335c46bd5c499c39b387f7d59769ef4a3ca9e2" id="Form1">
    


  • Sure it can be done using Regular Expressions, the relevant one for your case is:

    SessionID=(\w+)
    

    enter image description here

    where \w is a meta character for the "word" - any letter or digit and + is for repetition.

    An easier option would be using Boundary Extractor where you need to just specify left and right boundaries and it will extract everything in-between:

    enter image description here

    moreover most probably the Boundary Extractor will work faster and consume less resources.

    Both approaches can be tested using View Results Tree listener, you will not have to re-run your requests.


Log in to reply
 

Suggested Topics

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