question

cwhitty avatar image
cwhitty asked ericnute edited

strange "auto-response" mapping

Using 4.2.1, my quick call writes the following back to the calling testcase: clark1: foo\nclark2: bar The auto-response mapper creates two queries clark1() and clark2(), but their contents are a list (.//clark1)[1] : foo (.//clark1)[2] : bar (.//clark2)[1] : foo (.//clark2)[2] : bar This seems to only only happens when using numbers. If I had used: clarkOne: foo\nclarkTwo: bar I would get: clarkOne() : foo clarkTwo() : bar This is rather un-handy - is there a workaround?
iTestresponse mapauto response mapping
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.

cwhitty avatar image cwhitty commented ·
This form did a pretty poor job of documenting my question - it escaped the backslashes. I should say: clark1: fooBACKSLASHnclark2: bar
0 Likes 0 ·

1 Answer

·
Yaseen avatar image
Yaseen answered
Hi Clark, I believe the root cause for this issue is that iTest auto maps for the below response, clark1: foo\\nclark2: bar as, clark\\d+:\\s+(\\w+) i.e., it includes the \d+ for the digits in the response as a result it creates four queries, 1 -> foo 2 -> foo 1 -> bar 2 -> bar whereas for the non-digits response such as, clarkOne: foo\\nclarkTwo: bar the regex generated would be as, clarkOne:\\s+(\\w+) clarkTwo:\\s+(\\w+) For auto generator mapping we cannot change the regular expression by ourself, by we can create a response map to overcome this issue. Attached is the sample response map for your reference. Hope this helps![link text][1] [1]: /storage/temp/3536-sample.ffrm

sample.ffrm (3.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.

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.