Blank custom property?
Is it possible to have a blank custom property? I have an endpoint from which I am grabbing two values, but sometimes the 2nd value is blank -- this is fine. A few steps later I hit another endpoint using both of these values, and I want to pass the blank value as a parameter.
The problem is, if the 2nd value is blank, when I make the property transfer it gets set to null. When I hit my endpoint with this null value as opposed to a blank, I'm not getting the correct response. I've hardcoded this request with the blank and it works great, so I know it's not an issue with passing blank parameters, the problem is the property transfer.
I've tried adding a groovy script to check for null, change it to "" (also tried a single blank space), and then re-set it to a property, but it still uses null, not to mention it adds like 3 extra steps of work for one simple task. I have legitimate reasons for wanting to do this, as it would eliminate a large chunk of work as well as prevent me from having to use a clunky conditional.
EDIT - Rookie mistake -- in my Groovy script I was checking against null and not "null" as a string...This fixed my issue, although I wish there were a way to treat nulls as blanks or something, it would make my script a lot cleaner.
On that note, is it possible to make a property transfer within a Groovy script? As it stands, I have to:
-grab my values
-property transfer to custom properties
-groovy script with null check
-property transfer to request
I could at least eliminate the last property transfer if I could do it within the script.
- Here are some links, please go thru them. If you have any specific problem, open a topic.
http://stackoverflow.com/questions/32722014/soapui-transfer-response-payload-value-to-new-request-different-test-steps/32756418#32756418
https://github.com/nmrao/soapUIGroovyScripts/tree/master/groovy
http://stackoverflow.com/users/1702943/rao?tab=answers