My view is a different one: we should not make jBehave framework
too complex and make it support things that could otherwise could be achieved
with a little bit of programming effort. Too complex means hard to understand
and unless a good reason for it, it should be avoided.

 

So the scenario:

Given foo

When bar

Then the test should be passed 95% of the times

 

Can easily implemented to achieve this by implementing the “Then
the test should be passed ...” as a loop that will call the “Given foo” and 
“When
bar” in a loop for as many times as it is needed; say a default value of 20-1=19
times or just configured it somewhere or passed as a step parameter, etc.

At the end of each iteration behind the scenes you collect
the statistics and when the loop finishes just make the maths.

 

Just a 2c opinion.

Regards,

Julian

--- On Tue, 18/12/12, Mauro Talevi <[email protected]> wrote:

From: Mauro Talevi <[email protected]>
Subject: Re: [jbehave-user] Repeating scenarios
To: "[email protected]" <[email protected]>
Received: Tuesday, 18 December, 2012, 4:52 AM

Hi,

It's not something we can handle out of the box at present.

I could envisage a new way to specify a n examples table by criteria, rather 
than by explicit rows.  In this case we could add some properties to specify a 
percentage of success. 

If you want you could open a new jira issue to start putting down your 
requirements of this new issue.

On 13 Dec 2012, at 12:06, mary walshe <[email protected]> wrote:

> Hi all,
> 
> I have a situation where I need to assert against something that happens 95% 
> of the time. For e.g
> 
> Given foo
> When bar
> Then the test should pass 95% of the time
> 
> I would like to repeat this particular scenario 20 times to ensure that their 
> is only one failure out of the 20.
> 
> I cannot see anyway bar using examples tables how to repeat a scenario. The 
> parameters are not changing in this situation so I do not want to add 
> examples tables as they would just be an implementation and not part of the 
> story.
> 
> Does anyone know how I could repeat a scenario or a story.
> 
> Cheers,
> Mary

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to