0

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">
1
  • <form name="Form1" method="post" action="./ResolutionStatus.aspx?SessionID=f4335c46bd5c499c39b387f7d59769ef4a3ca9e2" id="Form1">
    – Guruganesh
    Dec 12 '19 at 8:26
1

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.

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