Ask a Question

Unable to Transfer property from response to testcase level property

SOLVED
FrankP
Occasional Contributor

Unable to Transfer property from response to testcase level property

I want to transfer a property from an existing Response to a property named 'BenchmarkId' defined at the TestCase level. This gives an error 'Unexpected element CDATA'. See attachment.

 

I'm also wondering why after selecting a testcase property as the target property for a transfer it's still possible to select a Path language on the target side.

7 REPLIES 7
Lucian
Community Hero

Hey,

 

Usually when I get this kind of errors there is some data missing. Could you provide the response of the 'Get Benchmarks by SurbeyId' step?

 

Regarding the other question... You also have a path language and an empty field beneath because (as far as I know) you can pass property values directly into a request if - let's say - you have some variable in there or something.



If my answer helped please click on the 'Accept as Solution' button.
FrankP
Occasional Contributor

This is the response:

 

<Response>
<e>
<id>9090</id>
<benchmarkId>1</benchmarkId>
<calculationId>146</calculationId>
<showTop3>false</showTop3>
<order>0</order>
<name>Benchmark Nederland</name>
<groupName>Commonly used benchmarks</groupName>
<calculationName>Calculation #146</calculationName>
<calculatedOn>2018-02-28T00:00:00+00:00</calculatedOn>
</e>
</Response>

 

 

I know that you can pass property values direct into a request but I would expect the posibilities of defining an Xpath etc. to be disabled after selecting a Custom property as target. 

Lucian
Community Hero

I get your point but yeah... this is what we have Smiley Very Happy

 

Now as for your problem I'm not sure but it does work for me.

 

2018-06-18_17h43_06.png

 

Maybe you can send me the SoapUI project so I can help you?



If my answer helped please click on the 'Accept as Solution' button.
FrankP
Occasional Contributor

What in your reply attracts my attention is that the Icon to select a node from the respons is enabled in your case (at least is partly green). In my case this possibility is disabled so I had to write this XPath expression myself. I doubt if this has something to do with my problem. It's not possible for me to send you the rest project becaus it's an internal project.

 

By the way, the same option to select from the response works fine for assertions.

Lucian
Community Hero

Well it's quite hard for me to help you otherwise Cat Sad btw it looks like you're using a quite older version. Could it be a bug in there?



If my answer helped please click on the 'Accept as Solution' button.
FrankP
Occasional Contributor

Thank you so far. I changed the select language to JSonPath and it's working fine now.

 

I found out that selecting ResponseAsXml for the source property also works fine.

TanyaYatskovska
SmartBear Alumni (Retired)

Thanks for sharing the solution with us, @FrankP!

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: