question

Ales avatar image
Ales asked Ales posted

Problem with queries in block response map

Hi everybody.

 

I am using block mapping techology to get my data from response.

And now I want to use this data using queries.

I have created queries and used them in my test case but I get this error every time: Invalid query: Expected: )

I also pass one argument to my queries.

 

I use query in test case like this: [query /data/show_sensor_RM_Response_ES Sensor_value_by_Sensor_name($sensorName)]

$sensorName is argument to my queries.

 

Can someone please help me with this problem. I don't know where I did a mistake.

 

I have attached the response map and picture where I use query.

iTest that I am using is: Version: 4.1.4 Build: 63326

 

Thank you in advance,

Ales

 

iTestresponse map
Query problem.jpg (305.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.

1 Answer

·
msandeep avatar image
msandeep answered msandeep posted

Hi,

 

Please try by adding the variable/argument "sensorName" in double quotes as shown in below screenshot

 

Thanks!


variable.jpg (68.6 KiB)
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.

Ales avatar image Ales commented ·

Hi msandeep!

 

This works :) Thank you soo much.

I don't actually know why it works but it does :)

 

Why do I need double quotes? It is strange becouse query already has single quotes in query format (//Sensor_value)[../Sensor_name = '{0}'].

If I get this right then argument is represented as string when it comes into query.

Why must there be another double quotes when passing the argument?

 

I hope I don't get to deep into iTest's background logic with this question :)

 

Thank you again for quick answer

 

Regards,

Ales

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.