question

rajeshml avatar image
rajeshml asked rajeshml posted

Response maps - tried block and pattern

Hi,

 

Queries for the RM's created return unexpected data. Can anyone comment what could be the issue here ?

I’ve tried to crack this for some time now.. Attached are the .ffrm with respective issues

 

 

  • ·         get_content.ffrm – uses block matching

 

o   this one matches dom_grp as vrf and rest of the columns (vlan and state) are offset accordingly

 

 

 

1.       matches the VRF_ANY_CONT content more than once

2.       does not match l4_prot properly

3.       dom_grp gets additional entry as vrf_1 – probably linked to issue #1

4.       above has ripple effect on following columns/variables.

 

iTestresponse map
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
PaulD avatar image
PaulD answered PaulD posted

First, you should probably know that table mapping is the best technology for this type of response.  You have shown how you might use block mapping or pattern mapping instead, but table mapping will generally be a lot easier when you have a nice normal table like this.  In fact, if you allow iTest to auto-generate a map for you, it will produce a table map with all of the correct columns, etc.  (I just tried it.)

 

If you are going to do this via block mapping, you are going to run into problems because of all of the wildcard and optional tokens that you have created.  iTest is going to find lots of different ways that it could potentially match these various rows.  In this particular case, the structure of the table just has too much ambiguity to make block mapping very successful.

 

Pattern mapping allows you to take block mapping to the next level, because you can be very specific about the patterns you are expecting.  In this case, though, you must deal with that same ambiguity described above by getting into the regex definitions for each of the fields involved -- to remove that ambiguity.  

 

So I recommend that you just create a table map, and you'll see that it will map it correctly for you.  There is also a feature of table mapping that you might not be aware of, but you can even ask iTest to parse the content within one column so that you can query each sub-part of the column.  So if you set the checkbox, "Parse cell contents", on the definition of the column properties for your" destination" column, you'll be able to query each part of that cell contents -- letting you pull out just the IP address, for example, or check to get other parts of it.

3 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rajeshml avatar image rajeshml commented ·

Thanks for the suggestion.

 

I've tried the table mapping but I have not tried the "parse cell contents" to see if it works for me. Will keep you posted.

0 Likes 0 ·
rajeshml avatar image rajeshml rajeshml commented ·

tried what you recommended but do not see the cells in the destination column being split. I could just be missing something.

 

Thanks

0 Likes 0 ·
rajeshml avatar image rajeshml rajeshml commented ·

I had to get to those cells via custom queries - which I realized with the help of Adeel.  Thanks for your help.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.