【发布时间】:2021-04-16 03:52:25
【问题描述】:
我已阅读以下文档:https://github.com/intuit/karate#path
我还在这些论坛上阅读了许多相关主题的答案,最值得注意的是:How to dynamically create URL having path in between URL using Karate framework
但是,我仍然无法理解这个概念。也许我比一个典型的新手更像一个新手。我的问题是这样的:
The complete api: /sample/api/v1/sampleweb/{sampleweb}/webversion/{version}
Feature:
Background:
* def baseUrl = '/sample/api/v1/'
@postRandomData
Scenario: POST API for creating data
Given url host
And path baseUrl
到底如何将 Url 的其余部分添加到“baseUrl”(基本上是上面列出的完整路径)?我应该将“sampleweb/{sampleweb}/webversion/{version}”放入变量中,然后只执行“baseUrl + variable”吗?
请指教。
【问题讨论】:
标签: automated-tests cucumber karate