Testing 如何访问同一测试套件中另一个测试用例的测试步骤请求

Testing 如何访问同一测试套件中另一个测试用例的测试步骤请求,testing,groovy,soapui,Testing,Groovy,Soapui,我有1个测试套件,其中包含2个测试用例。在第一个测试用例中,我有一个SOAP测试请求。我想要访问这个测试请求,我想要这个请求的确切请求! 我用过: 所以,通过这种方式,我得到的一切都是回应,但我想要的是请求 如何才能做到这一点?请使用以下代码获取相同测试套件但不同测试用例的测试步骤请求: GroovyScript: //Get the test step create which is present in Create&Repeat test case of the same suit

我有1个测试套件,其中包含2个测试用例。在第一个测试用例中,我有一个SOAP测试请求。我想要访问这个测试请求,我想要这个请求的确切请求! 我用过:

所以,通过这种方式,我得到的一切都是回应,但我想要的是请求


如何才能做到这一点?

请使用以下代码获取相同测试套件但不同测试用例的测试步骤请求:

GroovyScript:

//Get the test step create which is present in Create&Repeat test case of the same suite
def step = context.testCase.testSuite.testCases['Create&Repeat'].testSteps['create']
log.info step.httpRequest.requestContent

两个测试用例都在同一个套件中吗?@Rao正如我所写的,是的,它们都在同一个套件中,叫做“内部”Nikita,请检查答案。是的,这正是我需要的。你从哪里得到的信息?我搜索了SOAPUIAPI来查找方法,但不是很好…仅在API中可用,否则我将无法获得它。顺便说一句,您不会找到它,因为我提供的是groovified语句。很高兴这有帮助
//Get the test step create which is present in Create&Repeat test case of the same suite
def step = context.testCase.testSuite.testCases['Create&Repeat'].testSteps['create']
log.info step.httpRequest.requestContent