Regular Expression Extractor

Apache JMeter can be easily used for functional testing and has a useful feature, called a Regular Expression Extractor.

Let’s analyze a sample test in which we check a web page title.

  • The first step is to do a GET call for┬áthe page:

getPage

  • The response will be:

response_body

  • Link the Regular Expression Extractor to the HTTP request, defining the regular expression and the reference name for a future assert on the value:

regular_expression

  • Finally, verify the title using a Response Assertion, applying it to the title variable and defining the expected value:

regular_expression_assert

Add a Comment

Your email address will not be published. Required fields are marked *