如何从groovy脚本设置SOAPUI JDBC Request步骤的连接字符串?

时间:2015-09-29 16:03:04

标签: jdbc groovy soapui

我会在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

1 个答案:

答案 0 :(得分:0)

经过多次混乱后&跳过对象,因为在soapui文档概述中看不到JdbcTestRequest ....找到了有问题的对象:https://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/JdbcRequestTestStep.html

答案是

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