Feature: Test Type
Background:
* url host
* def name = 'test_name'
* def label = name
Scenario Outline: Test 2
Given url homeLinks.groupTypesUrl
And headers { tenant: #(tenantId), Authorization: #(authToken) }
* def name = <name>
* def description = <description>
* def label = <label>
* json data = read('path/to/file/create_group_type_request.json')
And request data
When method POST
Then status 400
Examples:
| name | label | description |
| '\u0000' | 'label' | 'description' |
| #(name) | '\u0000'| 'description' |
我需要引用示例地图中定义的全局名称。如何获得该参考?
当我尝试喜欢上面的代码时,出现 Javascript 评估错误。
Yes, Examples
do not支持JS eval和变量。使用table形成并用 a 循环它call
第二个功能:https://github.com/intuit/karate#calling-other-feature-files
或者你可以尝试使用动态Scenario Outline
通过初始化table
在后台:https://github.com/intuit/karate#dynamic-scenario-outline
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)