Dont want the scenarios to rerun again after failure(using Specflow + Specrun)

1,238 views
Skip to first unread message

Shah Jigesh

unread,
Feb 6, 2014, 9:55:53 AM2/6/14
to spec...@googlegroups.com
Hi 

Using Specflow + SpecRun

I am running two scenarios one is scenario outline  and scenario two is normal scenario  .. The execution flow is such that scenario outline runs first then runs the normal scenario

@mytag4
Scenario Outline: outline
    Given I am a user
    When I enter <x> as an amount
    Then the result should be <result>
    Examples:
        |x|result|
        |1|3     |
        |1|1     |

@mytag4
Scenario: Add two numbers B
Given I have entered 5 into the calculator
And I have entered 5 into the calculator
When I press add
Then the result should be a on the screen
| Title | Description | Comments |
|  A    | ghhgg       |   comma  |
|  B    | ghgab       |   commb  |
|  C    | ghgac       |   commc  |

I purposely failed the scenario outline for my testing purpose.

The strange thing that has happened is the scenario is retried twice(not sure whether  its a default functionality).


what I want is once it fails it should retry  again otherwise it will consume lot of my execution time.
I even tried by removing stopAfterFailures="2" attribute from execution tag in default profile but it did not work.

Not sure what to do

carlin scott

unread,
Mar 19, 2015, 6:36:19 PM3/19/15
to spec...@googlegroups.com
What happens if you set stopAfterFailures to 1 or 0?

Gáspár Nagy

unread,
Mar 24, 2015, 2:12:46 AM3/24/15
to spec...@googlegroups.com
In the .srprofile, you have to set the RetryFor="None" attribute in the execution element: <Execution retryFor="None" ... />

Ajit Bhosale

unread,
Jan 12, 2016, 2:43:37 AM1/12/16
to SpecFlow
Can i configure stopAfterFailures and retryFor  by code, means feature wise. 

upali nandy

unread,
Sep 30, 2016, 6:13:18 AM9/30/16
to SpecFlow
Hi Gaspar,

As suggested by you I have addded RetryFor="None" attribute in the execution element: <Execution retryFor="None" ... /> in Default.srnprofile.
But that does not seem to work.
Reply all
Reply to author
Forward
0 new messages