Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cucumber 如何将excel文件中的示例传递给场景大纲_Cucumber - Fatal编程技术网

Cucumber 如何将excel文件中的示例传递给场景大纲

Cucumber 如何将excel文件中的示例传递给场景大纲,cucumber,Cucumber,在BDDSpecFlow中,我们具有从excel传递场景大纲示例的功能,如下所示 Feature: ExcelTestFeature test transform of excel data into dictionary Scenario Outline: Multiline Data Given data converts to "<one>", "<two>" dictionary @source:Testd

在BDDSpecFlow中,我们具有从excel传递场景大纲示例的功能,如下所示

Feature: ExcelTestFeature
        test transform of excel data into dictionary

Scenario Outline: Multiline Data
                  Given data converts to "<one>", "<two>" dictionary

 @source:Testdata.xlsx:Sheet1
 Examples:
 |ono|two|
Feature:ExcelTestFeature
excel数据到字典的测试转换
场景大纲:多行数据
给定数据转换为“”字典
@来源:Testdata.xlsx:Sheet1
示例:
|小野二号|
我们是否有黄瓜bdd中的@source:Testdata.xlsx:Sheet1的等效代码


注意:我需要在qmetry自动化框架中使用cucumber解决方案

如果您使用的是cucumber with java,您可以添加依赖项。然后,您可以将数据提供程序元数据添加到场景中,如下例所示:

@dataFile:Testdata.xlsx @sheetName:Sheet1
Scenario Outline: Multiline Data
      Given data converts to "<one>", "<two>" dictionary
@dataFile:Testdata.xlsx@sheetName:Sheet1
场景大纲:多行数据
给定数据转换为“”字典

我认为黄瓜中没有类似的成分。Cucumber建议使用datatable或示例表将数据构建到特征文件中。但是,可以使用外部数据表作为数据表。