Karate 在场景大纲的示例中,如果单元格为空,则不会忽略json键。需要做哪些更改?
下面是我使用的场景大纲。在第一行和第二行中,display_name为空,但仍在我的请求负载中发送display_nameKarate 在场景大纲的示例中,如果单元格为空,则不会忽略json键。需要做哪些更改?,karate,Karate,下面是我使用的场景大纲。在第一行和第二行中,display_name为空,但仍在我的请求负载中发送display_name Scenario Outline: Negative cases Given path '/api/check' And request {name: <name> , description: <description> , display_name: <display_name>} When method POST
Scenario Outline: Negative cases
Given path '/api/check'
And request {name: <name> , description: <description> , display_name: <display_name>}
When method POST
Then status <status>
不幸的是,
示例
表发送一个空字符串。您可以使用table
作为替代方法,也可以将整个JSON放入一列中,许多团队都会这样做
| value |
| { some: 'json' } |
请参阅此示例:谢谢。。实际上,一开始我将整个JSON放入一列中,但当我试图从终端运行它时,我收到一个错误消息“多个构建操作失败。无法为|{name:'',description:'sasadss'}|”编写XML测试结果。但是所有的测试用例都通过了surefire报告@彼得
| value |
| { some: 'json' } |