Naren
Naren

Reputation: 1350

Why is my Scenario Outline not getting called in SpecFlow?

I am having a Scenario Outline as follows:

Scenario Outline: Create Request Custom Export With XML, Comma Delimited, Tab Delimited 
    Given a user has entered the following data
    | Custom Export     | File Format       | Vendor                 |
    |  Custom Export 1  | <File  Format>    | 001_TestsVendor_Rp     |    
    When I save
    Examples: 
    | File Format     |
    | XML             |
    | Comma Delimited |
    | Tab Delimited   |

But when I Run the scenario, Scenario outline is not getting called. But a normal scenario is running well.Is there any modification needed in the code?

Upvotes: 4

Views: 866

Answers (3)

Naren
Naren

Reputation: 1350

Thanks for your valuable responses. I got my problem fixed by installing Resharper software. I don't how it helps to run scenario outline. But it made me breathe easier. If any one got into such problem make a try on Resharper.

Thanks.

Upvotes: 0

Ralph Willgoss
Ralph Willgoss

Reputation: 12183

Are you using the Specflow Visual Studio Plugin?
Are you using Regex attributes as method bindings?
Can you post your method bindings Given/When syntax?

Can you see that Specflow has picked up the steps in your feature file, they should black. If they are purple-ish, it can't find the associated step.

If you've been refactoring, close and open the project again. I've had issues with the Specflow plugin where it couldn't pickup new methods after refactoring.

I haven't got to the bottom of why yet but thats a quick fix.

Upvotes: 0

AlSki
AlSki

Reputation: 6961

Isn't it simply because your scenario outline column <Format> does not match your examples column File Format ?

I would also question if you really need to use a table in the outline, it might read better if you used

Given we are using a custom export of type Custom Export 1
And a <Format> file format
And vendor 001_TestsVendor_Rp

Upvotes: 1

Related Questions