Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when:
➤ defining the property values of an object in dialog boxes or in programmatic descriptions
➤ parameterizing a step
➤ creating checkpoints with varying values
Regular expression is help us to smoothly run our script if there is any change in string which we can't even output. If we can output that string it's always better to output the string in table/parameter/environment variable and then where we have to verify that string then parametrized that with value.
So, it's not necessary for every varying string to customized with regular expression. According to me it's a bad option a tester choose. Because we can't confirm what the string exactly displayed and what we exactly want.
One good example is, If user get registered on our site, We show him his e-mail id in our message, then we should not customized the message with regular expression but we should output the e-mail address and then should match it exactly, which we can do easily.
Apr 24, 2008
When to use regular expression and when to avoid it?
Posted by Brijesh at 10:47 AM
Labels: Regular expression
Subscribe to:
Post Comments (Atom)
1 Comment:
Good details given.
Boise real estate
Post a Comment