English 中文(简体)
如何根据设想方案大纲阅读卷宗
原标题:How to read csv file based on scenario outline

我正在使用黄瓜,试图根据假想名称从我的卷宗中读到。

  Feature file :
    Scenario Outline: Verify content of my probblem1


Scenario,                       Title1, Title2, Title3, Title4, Title5
Verify content of my probblem1, Text1,  Text2,  Text3,  Text4,  Text5,
Verify content of my probblem2, Text1,  Text2,  Text3,  Text4,  Text5,
问题回答

The short answer is that reading CSV files from a Scenario written in Gherkin is not supported.

如果你想要阅读Excel文档中的数据,你就必须执行这一数据,并从您的步调来这一功能。 如“@marit”通知,Patrice POI可能是一种选择。

您所寻找的特征见http://qmetry.github.io/qaf/latest/gherkin_client.html“rel=“nofollow noreferer”>gherkin with qaf。 您可在CSV/Excel/XML/json/DB中找到实例。

Scenario Outline: Search Keyword using data from file
When I search for "<searchKey>"
Then I get at least <number> results
Then it should have "<searchResult>" in search results

Examples:{ datafile : resources/testdata.csv }

您的卷宗可参看:

searchKey,searchResult,number,TestCaseId
QMetry QAF, QMetry Automation Framework,15,TC-001
Selenium ISFW,Infostretch Test Automation Framework,45,111

参看,文件,分步骤逐级教学





相关问题
Why Cucumber hook methods aren t lowercase?

Cucumber has a few different hook methods like Before, After or AfterStep. I was wondering - why doesn t these method names follow Ruby s naming conventions to write method names all lowercase? ...

Cucumber Table Diff and colspan

I love cucumber, and its table diff feature. But I, often use a td colspan to display the title of the table. And I can t seem to get the table diff to work when I use colspan. (Table diff expects a ...

cucumber features --guess

I m setting up my Authlogic user session features. And I m in some kind of confusion. When I run: cucumber features I get some red errors Scenario: User signs in successfully ...

Rails | Cucumber | acl9 | AccessDenied

I am ramping up Cucumber, and I am having a issue getting one of my first tests to pass. The exception I am getting is: And I visit the new contract screen Acl9::AccessDenied (Acl9::AccessDenied) ...

Silencing Factory Girl logging

Just to clear the air, I am not some cruel factory master trying to silence working ladies. I am having a very annoying problem where when using Thoughtbot s factory girl in my specs, every time ...

How to resolve Rails model namespace collision

The story so far: I have a rails app with a model named "Term". All is well until trying to install Cucumber. Upon running rake cucumber I get Term is not a class (TypeError) This happens because ...

rspec testing views with internationalization?

I want to make sure I have the right meta desc/keyword and title text in my view so I want to create rspec views tests for that. Now the real challange here is how to make it work across multiple ...

热门标签