如何使soapUI 附件路径相对?
我正在使用soapUI 来测试HTTP 服务器。我需要发送一个多部分/表单数据请求,当我通过文件选择器并附加它时,该请求工作正常,但它将路径保存为绝对路径,并且我需要保存相对于我的测试文件的路径(但没有缓存在我的测试文件中)。我该怎么做?
仅供参考,我正在使用 SoapUI 4.0.1 免费版,如果我能弄清楚如何从中访问附件路径,我愿意使用常规编码步骤。
I'm using soapUI to test an HTTP server. I need to send a multipart/form-data request, and the request works fine when I go through the file chooser and attach it, but it's saving the path as an absolute path, and I need to save a path relative to my test file (but not cached IN my test file). How can I do this?
FYI, I'm using SoapUI 4.0.1 free edition and I am willing to using a groovy coding step if I could figure out how to access the attachment path from it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我通过添加常规编码步骤解决了这个问题。花了一些时间来浏览 API,因此在这里为其他人记录它。
显然,通过 getParentFile 导航到文件或子目录可能会有所不同,并且您的 testStep 名称也会有所不同。
OK, I solved this by adding a groovy coding step. Took a while to navigate the API, so documenting it here for others.
Obviously, the navigation to your file via getParentFile or to subdirectories may be different, and your testStep names will be different.