我们如何捕获 groovy 中的 ManualStepTest 描述和预期结果文本框值

How do we capture the ManualStepTest Description and Expected Result text box values in groovy

我已经通过 soap ui 工具中的 groovyscript 捕获了基于 xml & Jdbc 的请求和响应。

但我无法阅读手动步骤说明(description/expected 消息)。

使用下面的代码我可以到达手动测试步骤但不确定是否从文本框中读取值。

if(testStep.config.type=="manualTestStep")
{ log.info "this is manual request"} 

有人可以提前在 this.Thanks 上提出您的想法。 添加屏幕截图以供参考currently the outputlog.info is displaying

手动步骤的响应DuringTestExecution

下面的命令是在soapui[=中获取手动步骤描述 15=]

def desdcriptionOfManualTestStep=testRunner.testCase.getTestStepByName("Manual").description
log.info desdcriptionOfManualTestStep

您也可以使用下面的代码来描述手动步骤

def desdcriptionOfManualTestStep=testRunner.testCase.getTestStepByName("Manual").getDescription()
log.info desdcriptionOfManualTestStep

以下命令可以帮助您获得预期结果

def expectedResult = context.expand( '${Manual#ExpectedResult}' )
log.info expectedResult

这是手动步骤

这是日志