Post-Processor will be executed when a Sampler Request finishes its execution. If you need to use post-processor for a particular Sampler, then add it as a child of that Sampler. It is used to process response data from server and extract specific value for later use.
Post-Processor elements list is as follows:
- BeanShell PostProcessor
- BSF PostProcessor
- CSS/JQuery Extractor
- Debug PostProcessor
- JDBC PostProcessor
- JSON Path PostProcessor
- JSR223 PostProcessor
- Regular Expression Extractor
- Result Status Action Handler
- XPath Extractor
Let’s have a look on some common types of Post-processors:
1: Regular Expression Extractor
Regular Expression Extractor is used to extract values from the response of test server using a Perl-Type Regular Expression. Being a Post-Processor, it will execute after each Sampler request. It will extract the desired value by using the regular expression and generate template string, then it will store the extracted value in the specified variable name.
2: XPath Extractor:
XPath Extractor element is used to extract values from structured response XML or (X)HTML by using XPath query language
- Use Tidy Checkbox: If selected use Tidy to parse HTML response into XHTML.
- If selected then fragment will be returned instead of just text. It means you will get the Title name along with its tags in our case.
- The variable name in which the test result will be stored.
- XPath Query: Element query in XPath language and it can also return more than one match.
3: Result Status Action Handler:
Result Status Action Handler element can be used to stop the thread or the test if the relevant sampler gets failed.