question

bbaker avatar image
bbaker asked bbaker posted

Response Mapping Eval Statements

I'm running into a problem with how iTest handles responses from Eval statements. 

 

Throughout out testcases, we are displaying progress messages to give us a indication on what a test is doing at a specifc time.  As a testcase loops through the devices in a topology, we will log a message as to whether a unit is about to be tested.

 

Eval_Query.png

 

The problem we are having is that iTest does not reliably collect the information for the query.  If deviceName is set to "foo1" everything works fine.  However, if deviceName is set to "foo", then iTest doesn't generate the query group1.  If group1 doesn't exist, the testcase will fail.

 

Is there a better way to process an Eval statemet that will consistently generate a query regardless of the returned value?

iTestresponse map
Eval_Query.png (6.7 KiB)
10 |950

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

mallikarjunarao avatar image
mallikarjunarao answered mallikarjunarao posted

baker,

 

Could you use regex insted of query I hope this example will solve your problem.

 

RegualarExp.png

 

Thanks

Malli


RegualarExp.png (6.6 KiB)
10 |950

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

sandeepreddynv avatar image
sandeepreddynv answered sandeepreddynv posted

Hi,

 

I have understand your issue. iTest will look for the variables i.e like integers, etc in the response then accoding to the variables it will create queries by using quto generated response map.

 

In your case " foo1" is having the variable(integer) 1, so it is creating response map. "foo" is just a srting so, it is not creating any response map.

 

It is better to create a response map for the step and use the queries from the response map.

 

Hope this helps !!!

 

Thanks,

Venkat

6 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.

bbaker avatar image bbaker commented ·

How do you set the applicability for a Response Map to an Eval statement?

 

I've made a few attempts, but the Response Map only works if I manually assign it to the statement.  I've got too many instances of this issue to go back and manually tie each statement to the Response Map.

 

Is there a way I can configure the auto-mapping so it will match on a string as well as an int?  That would be a lot simpler.

0 Likes 0 ·
YujieL avatar image YujieL bbaker commented ·

for your first question: No, response map applicability is not supported for exec actions.

0 Likes 0 ·
bbaker avatar image bbaker YujieL commented ·

Does this mean the suggested way to fix this problem isn't supported?

0 Likes 0 ·
YujieL avatar image YujieL bbaker commented ·

I don't think you can configure how auto-mapping works.  Do you have an example of your response and how it is currently mapped?

0 Likes 0 ·
bbaker avatar image bbaker YujieL commented ·

Most of the responses are along the lines of:

PPPoE_Unit1

PPPoE_Unit2

PPPoE_Unit3

 

The problem occurs when a check in done on a non-test unit:

PPPoE Server

SpirentTestCenter

 

We also have some testbeds where the engineer got creative with the device names:

Frankenstein

Godzilla

Mummy

etc...

 

The screen shot in first post is one of the more basic examples.

0 Likes 0 ·
YujieL avatar image YujieL bbaker commented ·

I don't see a way around having to specify a response map for each of these steps.

 

If the steps are common, you can maybe put them in a procedure.

 

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.