question

maiphan avatar image
maiphan asked maiphan posted

How to query from response map using variable in iTest 3.4?

In iTest 3.2, we usually query from response map using variable (i.e: query status_by_ip("$ipaddr")), but seem like in iTest 3.4, when trying to query status_by_ip("$ipaddr") displays error message that no match found, or using status_by_ip($ipaddr) displays invalid query.

 

Thanks.

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.

maiphan avatar image
maiphan answered maiphan posted
Thank you. I have to check that box for it to work. So it didn't convert the check box in iTest 3.2 to iTest 3.4. All the old test cases, we have to explicitly click to the grey box in analysis rule when there is argument.
10 |950

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

YujieL avatar image
YujieL answered YujieL posted

I tried creating a simple test case that has some queries, and I used a variable for the argument. The query was extracted correctly.  Are you sure that your variable exists and contains the right value?

You can also paste your query in the Structure View on the step that contains the response.  Replace the variable with the actual value, and see if it finds any matches.

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.

YujieL avatar image YujieL commented ·
I used the query in an analysis rule and I also got an invalid query execution issue.  What you need to do then is turn on field substitution.  There is a little gray box besides the query text field.  It says that field substitution is turned off by default.  Click on the gray box to turn on field substitution.  You'll see a little "F" in the gray box.
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.