是否可以从 Groovy 脚本测试步骤运行其他测试用例中的特定测试步骤?
不知道该怎么做
谢谢
对的,这是可能的。从 groovy 步骤中,您可以访问 testRunner,您可以使用它来访问soapUI 中的其他所有内容,并且可以在另一个测试用例中运行测试步骤。
所以,这段代码来自我的脑海......
def tCase = testRunner.testCase.testSuite.project.testSuites["Name of the other test suite"].testCases["name of test case you want to access"]
or
def tCase = testRunner.testCase.testSuite.testCases["Name of test cases"]
def tStep = tCase.testSteps["test step you want to run"]
tStep.run(testRunner, context)
看看这个link这可能会有一些帮助...
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)