Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有几个 SoapUI 测试步骤,其中响应返回为空(即“-> null/空响应”),这是我所期望的。
如何断言对测试步骤请求的响应为空?
到目前为止,我已经尝试了以下方法,但没有成功:
.+
我最终在其中使用了一个脚本断言assert messageExchange.hasResponse() == false,这似乎有效。如果有更好的方法来断言条件,我将有兴趣学习它。
assert messageExchange.hasResponse() == false
我以这种方式解决了类似的问题:
response = context.testCase.testSteps['test step name'].testRequest.response assert response == null