RFT - Capturing partial Data(Text) Verification Point on a control
prakash s chauhan 27000140Y5 Visits (3547)
With Data Verification point a user creates a baseline data and this data is matched against the actual data retrieved during playback from the control.
Various types of data VP exist depending on the control , for example
Sometimes we might want to take Verification point on partial text from a control and that control will always return the full text.So lets say we have a DIV control that has following text ..
Your order has been received the order number is 123456.
You will receive your confirmation shortly.
Thank you for shopping with us
On this DIV if we set the data VP (visible text) , the data would be the entire three lines.
And let's say we only want the first line of data where the order number would change every time.
Here is one of the approaches to handle this in Rational Functional Tester.
Take the Data VP (visible text)on the DIV control.
Then on the final screen convert the Data to "Regular Expression" by clicking the button as shown below.
Modify the regular expression as per the requirement. Any text or part of the text in the above screen(once it has been converted to Regular expression) can be replaced with a pattern we want.
or we can use the Regular Expression Evaluator to help us , as shown below.
The Evaluator is pretty helpful as we can give random possible values to match against the pattern and check if it matches or not.
That's all we need to do , save the data VP and test it by playing back the script.