如何从groovy脚本设置SOAPUIJDBC请求步骤的连接字符串?

如何从groovy脚本设置SOAPUIJDBC请求步骤的连接字符串?,jdbc,groovy,soapui,Jdbc,Groovy,Soapui,我会在soapui论坛上发布这篇文章,但他们不允许我注册,也不显示任何错误的字段颜色=-= 没有在文档中找到它,我就瞎了 到目前为止我已经试过了,没有骰子: def project = testRunner.testCase.testSuite.project def db = project.getPropertyValue("dbConnectionString") testRunner.testCase.testSteps["JDBC Request"].setPropertyValue(

我会在soapui论坛上发布这篇文章,但他们不允许我注册,也不显示任何错误的字段颜色=-=

没有在文档中找到它,我就瞎了

到目前为止我已经试过了,没有骰子:

def project = testRunner.testCase.testSuite.project
def db = project.getPropertyValue("dbConnectionString")
testRunner.testCase.testSteps["JDBC Request"].setPropertyValue("Connection String", db)
log.info "db connection string set to "+ db

由于JdbcTestRequest在soapui文档概述中不可见,所以在经历了很多混乱之后,我们跳过了对象。。。。找到有问题的对象:

答案是

testRunner.testCase.testSteps["getOfferNames"].setConnectionString(db)