开发者

Parse issues when trying to use "Examples" section in Cucumber feature

No luck in googling on this error message

features/manage_hand_evaluator.feature: Parse error at features/manage_hand_evaluator.feature:21. Found examples when expecting one of: comment, py_string, row, scenario, scenario_outline, step, tag. (Current state: step). (Gherkin::Parser::ParseError)

Here's the setup I have for开发者_开发技巧 Examples section (there are no other Scenarios at this time, just this one after the "Feature:" section)

...

Scenario: Evaluating for current straights
  Given I am a player with <hand>
  When the board is <board>
  Then the current possible straights should be <possibles>

  Examples:
    | board | hand |    possibles                  | 
    | A23   | 45   | A2345                         | 
    | 3456  | 23   | A2345,23456,34567,45678       | 
    | 789T  | A2   | 56789,6789T,789TJ,89TJQ       | 
    | 45678 | 23   | 23456,34567,45678,56789,6789T | 

I also have step definitions set up already for those "Given, When, Then" lines (and tests passes fine when I replace , , with some text and comment out the "Examples" section). So it seems step definitions are set up properly, just that there is some kind of parsing issue with the contents I have in .feature file and I cannot figure out what I am doing wrong.

Relevant gems installed: Gherkin (2.1.5) (tried 2.2.0 but it breaks with my version of Cucumber) Cucumber (0.8.5) Cucumber-Rails (0.3.2) Rails (2.3.8)


Replace

Scenario:

with

Scenario Outline:


When you have tests that extends to having examples, you should always use Scenario Outline. Scenario is for those kind of tests with not more than one data to be inputted to test.


still not working can any one help

Feature: validate whether Report page is working or not

Scenario: validate the Report Module

Given Click on Report module

When Click on select Distributor drop down

And select the Distributor

And upload the report

And click on Confirm button

And submit fot Review

Examples: 
                    | AWAL   |
                    | CDBaby |  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜