[ 
https://jira.codehaus.org/browse/JBEHAVE-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296107#comment-296107
 ] 

Dave Carey commented on JBEHAVE-753:
------------------------------------

Hi Mauro
It looks to be exactly as requested - Thanks very much - it certainly will be a 
big assistance to the way we plan to organise our acceptance tests.

However I was trying to test with the latest 3.7 snapshot from the nexus 
repository and it didn't seem to be working. 
I then noticed though that this is dated from the 4th April and that pre-dates 
your changes which I think are all from the 8th.  

How often are the latest snapshots generated on Nexus? (Apologies if I'm 
missing some obvious part of the build procedure)

Thanks
Dave
                
> Allow GivenStories to be parametrised by examples in a scenario context
> -----------------------------------------------------------------------
>
>                 Key: JBEHAVE-753
>                 URL: https://jira.codehaus.org/browse/JBEHAVE-753
>             Project: JBehave
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.6
>            Reporter: Dave Carey
>            Assignee: Mauro Talevi
>             Fix For: 3.6.2
>
>
> h3.  Introduction
> JBehave supports parameterizing scenarios to allow repeating tests. _e.g. As 
> shown in the documentation:-_
> {noformat}
> Given a stock of <symbol> and a <threshold>
> When the stock is traded at <price>
> Then the alert status should be <status>
>  
> Examples:    
> |symbol|threshold|price|status|
> |STK1|10.0|5.0|OFF|
> |STK1|10.0|11.0|ON
> {noformat}
> It would be desirable if this convention could be extended to be used in 
> combination with a *Given Story*.
> To demonstrate by means of an extension to the documentation example:-
> Suppose there is a requirement to select a specific "Stock Exchange" before 
> executing each of the tests above.
> Rather than building this into the story,  we might opt, for reuse purposes, 
> to use a *Given Story* to first select the "Stock Exchange".
> Now the first example would be _'Nasdaq'_  and the second _'FTSE'._  
> The hypothetical configuration might then be:-
> {noformat}
> GivenStories: acme/givenstories/SelectAStockExchange.story
> Given a stock of <symbol> and a <threshold>
> When the stock is traded at <price>
> Then the alert status should be <status>
>  
> Examples:    
> |stockExchange|symbol|threshold|price|status|
> |NASDAQ|STK1|10.0|5.0|OFF|
> |FTSE|STK1|10.0|11.0|ON
> {noformat}
> h3.  Current Behaviour
> Unfortunately the example above will not work as desired
> The 'GivenStory',  _SelectAStockExchange.story_,  does +not+ inherit the 
> parameterized variables as night be expected.
> Nor does the obvious supporting feature, anchor tags, help because only a 
> specific row number can be specified in the anchor tag.  
> e.g. 
> {noformat}
> GivenStories: acme/givenstories/SelectAStockExchange.story{0}
> {noformat}
> h3.  Suggested Behaviour
> The Given Story should be considered part of the be parametrised scenario 
> context and inherit the parameters of the row currently being executed.
> Referencing previous response from Mauro on the dev mail thread
> _"As I understand it, you'd like the GivenStories to be considered as part of 
> the parametrised scenario context and be passed the row of parameters that is 
> being processed as part of a parametrised scenario.   I guess, we could make 
> that the default behaviour, and any parameters passed to the given stories 
> could be overridden by the execution of the given story"_

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to