question

TLee avatar image
TLee Suspended asked TLee Suspended posted

Handling "horizontal" tables?

I have a table that lists the stats down the left side of the table and has a varying number of columns (based on the number of interfaces on my router).  I tried to use table mapping but that does not work properly for this type of table.  How should I go about mapping this type of table response?

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

·
TLee avatar image
TLee Suspended answered TLee Suspended posted
I guess a better way to state this is I have a fixed number of rows but a variable number of columns.
1 comment
10 |950

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

PaulD avatar image PaulD commented ·

I'm attaching a sample for how you can handle this case.  In table mapping, there is a nice feature called "repeating columns".  If you know you will have an indefinite number of columns, you can set up the initial columns and then check the box that says, "Use the last column as a template for additional identical columns".  Then iTest will automatically find as many similar columns as exist in the response.

 

Then you set the first column (containing the name of the statistic) as the key column.  Then you will have a query that gets you the value for a given statistic.  This query will find matches for all of the columns.  Then you can select an index into this query to get the value you need.  Of course, you will also need to know which column index your port of interest is located in -- but that is usually easy because your output will list columns in order.  Your analysis rule will end up looking something like this:

 

value_by_Stat("inpkts")[3] > 1000

 

You can also consider doing some clever work by creating some custom queries (on the Queries tab in the response map editor) if you want to create a custom query that will pull out the stats using the name of your ports instead of index.  

 

0 Likes 0 ·
horz_table.ffrm (1.4 KiB)

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.