Hi,
1. I am unable to pass a value using the -Dmaven.soapui.test.serviceEndpoint=http://new.endpoint.com switch when running from the command line and or Jenkins. The value set in the xml file does not get overridden. |
You will need to add this to your pom file under configurations with the other soapui settings.
<projectProperties>
<value>ServiceEndpoint=Hello World!</value>
</projectProperties>
Please see the example here
http://www.soapui.org/Test-Automation/maven-2x.html2. When creating Groovy assertions I am unable to pass the value of the variable endpoint to the holder.namespaces value
import com.eviware.soapui.support.XmlHolder
def serviceEndpoint = context.expand( '${#Project#ServiceEndpoint}' )
def holder = new XmlHolder( messageExchange.responseContentAsXml ) holder.namespaces["ns1"] = "$serviceEndpoint/aopui-service/v1/rest/request"
It returns the following "Error org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String"
|
I believe the problem is you are using the $ Groovy special character which is creating a Groovy String when a Java string is expected. You should do:
holder.namespaces["ns1"] = serviceEndpoint + "/aopui-service/v1/rest/request"
Regards,
Marcus
SmartBear Support