Regular Expression in Performance Testing
Regular Expression is the most effective way to handle dynamic
response in performance testing.
As we
know regular expression is pattern based mathematical calculation.
Regular
expressions or regex or regexp are extremely useful in extracting information
from any text by searching for one or more matches of a specific search pattern
Regular
expressions, as a concept, was founded by Stephen
Kleene, best known as the founder of the piece of mathematical logic known
as recursion theory
How to learn about RegEx ?
With
RegEx, we don’t really understand them until we use them, and we can’t really
use them until we understand them. So, we must learn a little bit, and then use
a little bit and get them wrong, and then go back to the concepts and learn a
little bit more.
In layman’s
language, Regular Expression is a pattern which is used to specify a set of
strings required for getting dynamic value. To prepare a regular expression, it
is important to learn how we can create it using metacharacter and literal
character.
Just a
tip, The most important and frequently used Reg-Ex for Performance testing is (.+?)
What is literal character
The most basic regular expression consists of a single literal character, such as a. It matches the first occurrence of that character in the string.
What is metacharacter
Metacharacters are the building blocks of regular expressions
using combination of various symbols
Below
table will help you to understand how reg-ex can be created.
Happy Testing!!!
Comments
Post a Comment