Feature: table keyword demo data driven testing feature
Scenario: table keyword demo data driven testing scenario
* table users
| name | job |
| null | null |
* call read('@user') users
@ignore @user
Scenario: create a new user
Given url 'https://reqres.in/api/users'
Given request {"name": '#(name)',"job": '#(job)'}
When method post
Then status 201
Then match $ == {name: '#(name)',job: '#(job)',id: #notnull,createdAt: #notnull}
我只是检查负面数据驱动测试场景是否也可以像场景大纲和示例那样用空手道中的表关键字覆盖
如果您确实想要该列,但将值
null
括在圆括号中,则将 null
括起来。文档中提到了这一点:https://github.com/karatelabs/karate#table
* table users
| name | job |
| (null) | (null) |