1.Read the data.xml file from feature file.
2.Replace tag value <UID> to random values - **First I have tried to replace with a hard-coded value,but no changes**
3.Go for POST method and get the response
data.xml and Test.feature file snippet is mentioned below -
**1.data.xml**
<Test>
<First>
<UID>87abc65</UID>
<Second>Food</Second>
</First>
</Test>
**2.Test.feature**
Explained the replace in below code -
场景:获取输出
def req = read('data.xml')
替换请求
| 令牌 | 价值 |
| @@UID@@ | '12345' |
- xml 请求 = 请求
并请求req
当方法 POST
然后状态 200