Forum Discussion

seanfox's avatar
seanfox
New Contributor
14 years ago

JSON Property Transfers or Property Expansion for Reports?

Hello,

I'm using SoapUI's TestSuites to test a service that handles XML and JSON, but JSON support in SoapUI seems rather limited. What I am trying to do is pretty simple and what I suspect most people do with TestSuites:
    1) Generate data
    2) Insert this data into a JSON request for a REST service
    3) Call the service
    4) Process the response
    5) Transfer some of the response fields to another JSON request for the REST service
    6) Call the service
    7) Process the response
    8) Etc. until finished


These are my concerns:
1) There appears to be no way to use a "Property Transfer" to move data into a JSON request; this only works for XML.
2) To get around (1) you can use property expansions in the request itself (SoapUI Pro makes this easy--not sure about community edition). E.g.
{"someObject": {
"example1": "${DataGen#example1}",
"example2": "${DataGen#example2}",
"example3": "${DataGen#example3}"
}

The problem with this approach is that if you launch the TestRunner and have it export failure reports, the request in the report will show up exactly like the above: ${DataGen#example1} ! This is not what you want to see in your failure reports. What you want to know is what the request really looked like:
{"someObject": {
"example1": "true",
"example2": "ABC",
"example3": "123"
}

Otherwise, you have no way to tell what the input was that caused the failure and these reports become useless.

Are there any solutions to this dilemma? It makes no difference to me if the solution uses Property Transfers or Property Expansion as long as I can transfer the data into JSON and still see the full property values for the requests in my failure reports.

Any help is much appreciated!
Sean
No RepliesBe the first to reply