【发布时间】:2017-03-31 10:41:03
【问题描述】:
我正在尝试在 SOAPUI 中使用 Groovy 执行 JDBC 测试步骤
def Proj = null
def workspace = testRunner.testCase.testSuite.project.getWorkspace();
Proj= workspace.getProjectByName("<ProjectName>")
def ProjTestCase = Proj.testSuites["["<TestSuiteName>"].testCases["
<TestCaseName>"]
def DBTestStep = ProjTestCase.getTestStepByName("Get_10_DBValues")
def runner = null
runner = DBTestStep.run(testRunner, context)
log.info(DBTestStep)
runner = null
我给了我以下输出 信息:com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep@7f34840b
【问题讨论】:
-
你试过定义
JDBC Test Step吗? -
@Rao,感谢您的回复。我能够开始工作......我还有一个问题,如何从命令行只运行一个 groovy 脚本(我的脚本包含要执行的测试用例)......?
-
您可以使用 SOAPUI_HOME/bin/testrunner.bat 或 .sh 来运行命令行。
-
我只想运行一个脚本(我的脚本将在一个测试用例中执行所有测试步骤),怎么能提到从命令行只执行一个 groovy 脚本?