InfusionQA
12 years agoNew Contributor
Pass parameter value to namespace variable
Hi
I am new on this forum so I wanted to say hello
I am struggling with SoapUI test case. I ha couple of environments. My REST service returns response in form that I need to define namespace in assert section. I use only Xpath way. Sometimes namespace variable contain environment address. I wanted to make it smart and replace environment address from ${#Endpoint} variable. I wanted to do it like this:
declare namespace ns1='${#Endpoint}/resourceURL';
//ns1:Response[1]/ns1:d[1]/ns1:results[1]/ns1:e[1]/ns1:_id[1]
This fails
What should I do ? I don't want to use script assertion.
I am new on this forum so I wanted to say hello
I am struggling with SoapUI test case. I ha couple of environments. My REST service returns response in form that I need to define namespace in assert section. I use only Xpath way. Sometimes namespace variable contain environment address. I wanted to make it smart and replace environment address from ${#Endpoint} variable. I wanted to do it like this:
declare namespace ns1='${#Endpoint}/resourceURL';
//ns1:Response[1]/ns1:d[1]/ns1:results[1]/ns1:e[1]/ns1:_id[1]
This fails
What should I do ? I don't want to use script assertion.