Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

problems of step return inconsistency

$
0
0

Hello,

I have a strange problem with my step result processing.

I have a step ("get all devices") that can return a list of devices. the result is always ["item1", "item2, ...] etc, even if I have only one item.

In a further step, I get this step's output and do a parsing :

items_list = jsonSlurper.parseText(items_list)

this works fine. I use this as the items can sometimes be listed as [{"uid1":"item1"}],etc.

The problem is that it sometimes fails because my input is incorrect.

If my first step provides me with two items or more ( ["item1", "item2, ...] ) the second step input (${get all devices#testResponse#$['result']}) gives me ["item1", "item2, ...] 

If my first step provides me with a single item (["item1]) the second step input is like [item1] => slight difference, but with the missing "" my json parsing fails

 

Does anyone knows why the format changes ?


Viewing all articles
Browse latest Browse all 20755

Trending Articles