Karate 如果示例的列太多 ,;每行都太长,无法读取!;
如果示例的列太多,则每一行都太长,无法读取Karate 如果示例的列太多 ,;每行都太长,无法读取!;,karate,Karate,如果示例的列太多,则每一行都太长,无法读取 Feature: Background: Scenario Outline: * match '<msg>' == <prefix> + ',' + '<end>' Examples: | prefix | end | msg | | hello | mike | hello,mike | | hello | jerry |
Feature:
Background:
Scenario Outline:
* match '<msg>' == <prefix> + ',' + '<end>'
Examples:
| prefix | end | msg |
| hello | mike | hello,mike |
| hello | jerry | hello,jerry |
功能:
背景:
情景大纲:
*匹配'==+','+''
示例:
|前缀| end | msg|
|你好|迈克|你好,迈克|
|你好|杰瑞|你好,杰瑞|
会不会是这样:
Feature:
Background:
Examples:
| prefix |
| hello |
Scenario Outline:
* match '<msg>' == <prefix> + ',' + '<end>'
Examples:
| end | msg |
| mike | hello,mike |
| jerry | hello,jerry |
功能:
背景:
示例:
|前缀|
|你好|
情景大纲:
*匹配'==+','+''
示例:
|完| msg|
|迈克|你好,迈克|
|杰瑞|你好,杰瑞|
我想把这些例子分成几个部分,或者在提纲之前设定一个基本的例子。我应该怎么做?空手道在其最新版本
0.9.X
中以许多不同的方式解决这个问题,让我们看看
示例:
场景大纲之前的表格:在空手道中使用csv
文件中,并务必阅读示例
Feature: my feature
Background: BG
* def myExample = read("myExample.csv")
Scenario Outline: SOW
* match '<msg>' == '<prefix>' + ',' + '<end>'
Examples:
| myExample |
功能:我的功能
背景:BG
*def myExample=read(“myExample.csv”)
情景概述:SOW
*匹配“”=”+”,“+”
示例:
|myExample|
JSON也是如此,它以JSON数组的形式提供数据
[
{
"prefix": "hello",
"end": "mike",
"msg": "hello,mike"
},
{
"prefix": "hello",
"end": "jerry",
"msg": "hello,jerry"
}
]
Feature: my feature
Background: BG
* def myExample = read("myExample.csv")
Scenario Outline: SOW
* match '<msg>' == '<prefix>' + ',' + '<end>'
Examples:
| myExample |