更改不同服务器的 SOAP UI 中的断言

发布于 2024-10-05 22:57:22 字数 299 浏览 0 评论 0原文

我为一台服务器准备了测试,每个测试用例都有自己的断言,如下所示:

declare namespace ns1='http://test.server.001';
//ns1:Response[1]/ns1:errorCode[1]/text()
expected: 1

当我使用此 test.server.001 时,它完全没问题。现在我需要运行 test.server.002 的测试,但由于命名空间不同,我得到断言失败。

有没有一种快速的方法来更改我所有案例的断言,我不想手动更改这些断言。谢谢!

I have my tests prepared for one servers, each test case has its own assertion like this:

declare namespace ns1='http://test.server.001';
//ns1:Response[1]/ns1:errorCode[1]/text()
expected: 1

It perfectly fine when I'm working with this test.server.001. Now I need to run my tests of test.server.002, but I'm getting Assertion Failed because of different namespace.

Is there a quick way to changes assertions for all my cases, I don't want to change those manually. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

|煩躁 2024-10-12 22:57:22

如果您将断言与每个请求相关联(而不是将断言存储在变量中),则没有一种快速方法可以更改所有请求。

我发现最快的方法是在文本编辑器中打开 XML 文件并执行查找/替换全部操作。

If you have the assertion tied to each request (as opposed to storing the assertion in a variable), there isn't a quick way to change them all.

The fastest way I have found is to open the XML file in a text editor and do a find/replace all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文