Essentially the ability to do a check using then, before moving to the next when, again followed by then. (kind of IF-ELSE condition)
Scenario 1
Given……
When……….
Then……….
When………
Then……….
Scenario 2
Given……
When……….
Then……….
When………
Then……….
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.
This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.
This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Given Bob has a trade for $92k of copper open for elaborationAnd Jane has the same trade open too
And Jane saves her changes before BobWhen Bob tries to save it
Then he should be asked if he wants to merge Jane's changes
Given Bob has filled in his detailsBut forgotten to agree to the terms and conditionsWhen he tries to submit the form
Then he is prompted to agree to the terms and conditions
And the form is not submitted
Given Bob has filled in his details
And indicated that he does agree to the terms and conditions
When he tries to submit the form
Then the submission is successful
And he is told that he'll hear back within 24 hours
Liz.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.
This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Hi Gordon,
Liz.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Hi Gordon,
Liz.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Hi Gordon,
Liz.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Dan North & Associates Ltd, registered in England and Wales, no. 6716833Registered address: 38 Donnington Road, Worcester Park, KT4 8EN
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Hi Gordon,
Liz.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsubs...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message.This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG or its parent company Travis Perkins plc (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG; VAT number 408556737) and any of its subsidiaries. Agreements binding Travis Perkins Trading Company Limited may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins Trading accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins Trading accepts no liability for infection and recommends that you scan this e-mail and any attachments.--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Dan North & Associates Ltd, registered in England and Wales, no. 6716833Registered address: 38 Donnington Road, Worcester Park, KT4 8EN
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
The “saved same trade” has to mean something. At some point before this scenario, I’d imagine there’d have to be:
Given Bob has a trade
When he saves it
Then ….
This scenario would have to test for the bits that are important when a trade is saved and would define what a “saved trade” looks like.
When this works, and the code to successfully rebuild a “saved trade”, it should be sufficient to go with the scenario with Bob and Jane, would it not?
Sure, it could be:
Then the trade as a save date of today
And the account has XX dollars on hold
And the symbol has been marked as in use
These conditions would hopefully include any attributes that are necessary to be set in order to help the second scenario.
Except the class is called "Waiter", and the capability I'm looking at (and therefore the behaviour, and therefore the" when") is the capability to wait for things. That's the method I'm exercising, so it definitely has to be a "when".
But, I'm heartened that you put the slow event as a "when" too; that did also feel right to me and is probably the most controversial line.
Is "the symbol being marked as in use" valuable? Is it something you would ever get from someone when you ask them, "What will you, or your customers, or your systems, be able to do that they can't do right now?"
It doesn't feel like I would ever get that naturally out of a conversation. It feels like compromising the real value I'm looking for.
Please feel free to disagree on this; I'm testing my own thinking here too. What do you think?
Yep, this is essentially a class that makes the asynchronous waiting easy (and I've used this "waiting" pattern in other automation frameworks too).
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Hi Cliff,This is the first pass, and thank you for making it!It doesn't work because there are a couple of other rules around Givens:- It shouldn't matter which order they happen in; they're just a bunch of contexts that exist
On 23 Sep 2015 7:14 am, "aslak hellesoy" <aslak.h...@gmail.com> wrote:
>
>
>
> On Tuesday, September 22, 2015, Liz Keogh <l...@lunivore.com> wrote:
>>
>> Hi Cliff,
>>
>> This is the first pass, and thank you for making it!
>>
>> It doesn't work because there are a couple of other rules around Givens:
>>
>> - It shouldn't matter which order they happen in; they're just a bunch of contexts that exist
>
>
> This is the first time I hear about this rule. It sounds interesting, but also a bit too strict.
>
> Where does this rule come from Liz?
Derived by me from the rule that the behaviour you're interested in should be in the "when"; if the order in which Givens are set up matters then it's because there's behaviour that matters.
Dan also mentioned this a few posts back.
The rule that it shouldn't matter how you got to the context has been around for a while.
As with all BDD, we can be pragmatic about this; I'm saying "rule" where I should probably say "guideline"... but it makes way more sense to me than the rule that there should only be one "when", in these situations. (Where did that one come from, anyway?)
Cheers,
Liz.
On 23 Sep 2015 7:14 am, "aslak hellesoy" <aslak.h...@gmail.com> wrote:
>
>
>
> On Tuesday, September 22, 2015, Liz Keogh <l...@lunivore.com> wrote:
>>
>> Hi Cliff,
>>
>> This is the first pass, and thank you for making it!
>>
>> It doesn't work because there are a couple of other rules around Givens:
>>
>> - It shouldn't matter which order they happen in; they're just a bunch of contexts that exist
>
>
> This is the first time I hear about this rule. It sounds interesting, but also a bit too strict.
>
> Where does this rule come from Liz?Derived by me from the rule that the behaviour you're interested in should be in the "when"; if the order in which Givens are set up matters then it's because there's behaviour that matters.
Dan also mentioned this a few posts back.
The rule that it shouldn't matter how you got to the context has been around for a while.
As with all BDD, we can be pragmatic about this; I'm saying "rule" where I should probably say "guideline"... but it makes way more sense to me than the rule that there should only be one "when", in these situations. (Where did that one come from, anyway?)
Cheers,
Liz.
--
Hi Andrew,
Specific example is in the original link along with the title (because it's unit-level, the specific example is the code - this is just how I do it; not remotely suggesting that it's the only way here).
Having said that, what would you write instead?
(Link again for ease of access: https://github.com/lunivore/WiPFlash/blob/master/WiPFlash.Behavior/Framework/WaiterBehaviour.cs )
Liz.
Dave,
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Dave,
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.
Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.
On 29 September 2015 at 08:38, Liz Keogh <l...@lunivore.com> wrote:Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.A context is the state the scenario starts! The 'just' diminishes its importance. Any behaviour is dependent on context, so how you describe the context is just as important as how you describe the behaviour. Perhaps because I see Givens and Whens as equals, I have less issues with making your first When a Given and expressing the scenario in that way.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
On 29 September 2015 at 19:37, Liz Keogh <l...@lunivore.com> wrote:On Tue, Sep 29, 2015 at 5:51 PM, Andrew Premdas <apre...@gmail.com> wrote:On 29 September 2015 at 08:38, Liz Keogh <l...@lunivore.com> wrote:Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.A context is the state the scenario starts! The 'just' diminishes its importance. Any behaviour is dependent on context, so how you describe the context is just as important as how you describe the behaviour. Perhaps because I see Givens and Whens as equals, I have less issues with making your first When a Given and expressing the scenario in that way....except that, if you put behaviour that you care about in the context, then the state in which the scenario starts isn't expressed by the Givens. It's expressed by the Givens that happen before the behaviour you care about, which isn't all of them, and the outcome isn't driven by just the events happening in that context; it's driven by something hidden within the context too.In that situation, it makes it really, really hard to discuss other scenarios which have the same events, or other outcomes which are important. It makes it harder to question whether the behaviour really should work that way. In other words, it makes it harder to have conversations about that scenario. (More on conversational patterns here.)And that's without talking about the difficulty of maintaining it, three months or three years later.Cheers,Liz.Perhaps all Givens are existing behaviour that has been explored in other scenarios,
--Typed with thumbs, please excuse errors.On 29 September 2015 at 19:37, Liz Keogh <l...@lunivore.com> wrote:On Tue, Sep 29, 2015 at 5:51 PM, Andrew Premdas <apre...@gmail.com> wrote:On 29 September 2015 at 08:38, Liz Keogh <l...@lunivore.com> wrote:Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.A context is the state the scenario starts! The 'just' diminishes its importance. Any behaviour is dependent on context, so how you describe the context is just as important as how you describe the behaviour. Perhaps because I see Givens and Whens as equals, I have less issues with making your first When a Given and expressing the scenario in that way....except that, if you put behaviour that you care about in the context, then the state in which the scenario starts isn't expressed by the Givens. It's expressed by the Givens that happen before the behaviour you care about, which isn't all of them, and the outcome isn't driven by just the events happening in that context; it's driven by something hidden within the context too.In that situation, it makes it really, really hard to discuss other scenarios which have the same events, or other outcomes which are important. It makes it harder to question whether the behaviour really should work that way. In other words, it makes it harder to have conversations about that scenario. (More on conversational patterns here.)And that's without talking about the difficulty of maintaining it, three months or three years later.Cheers,Liz.Perhaps all Givens are existing behaviour that has been explored in other scenarios,Not quite. Givens are an expression of current state, the Context for the scenario. They say what is true or what has happened. They don't have an opinion about behaviour so ideally they should be worded in state rather than behavioural terms (h/t Liz's conversational patterns).
On 30 Sep 2015, at 13:53, Andrew Premdas <apre...@gmail.com> wrote:On 30 September 2015 at 13:00, Dan North <d...@dannorth.net> wrote:
--Typed with thumbs, please excuse errors.On 29 September 2015 at 19:37, Liz Keogh <l...@lunivore.com> wrote:On Tue, Sep 29, 2015 at 5:51 PM, Andrew Premdas <apre...@gmail.com> wrote:On 29 September 2015 at 08:38, Liz Keogh <l...@lunivore.com> wrote:Hi Andrew,
> the focus should be on using language eloquently and stating intention with clarity
Right, which is why we have the separation between contexts and events. If something you're doing has behaviour you need to care about then it *is* an event, not a context. A context is just the state in which the scenario starts, otherwise it's more than just a context.
So far, nobody has been able to rewrite that scenario to use only one "when", while still capturing the important behaviour, without resorting to a split with an inelegant joining outcome / context that has no independent value, or hiding the behaviour in a " given", which I consider to be worse than using two "when's" as it violates an even more crucial guideline.
So I'm sticking to my two "when's".
Cheers,
Liz.A context is the state the scenario starts! The 'just' diminishes its importance. Any behaviour is dependent on context, so how you describe the context is just as important as how you describe the behaviour. Perhaps because I see Givens and Whens as equals, I have less issues with making your first When a Given and expressing the scenario in that way....except that, if you put behaviour that you care about in the context, then the state in which the scenario starts isn't expressed by the Givens. It's expressed by the Givens that happen before the behaviour you care about, which isn't all of them, and the outcome isn't driven by just the events happening in that context; it's driven by something hidden within the context too.In that situation, it makes it really, really hard to discuss other scenarios which have the same events, or other outcomes which are important. It makes it harder to question whether the behaviour really should work that way. In other words, it makes it harder to have conversations about that scenario. (More on conversational patterns here.)And that's without talking about the difficulty of maintaining it, three months or three years later.Cheers,Liz.Perhaps all Givens are existing behaviour that has been explored in other scenarios,Not quite. Givens are an expression of current state, the Context for the scenario. They say what is true or what has happened. They don't have an opinion about behaviour so ideally they should be worded in state rather than behavioural terms (h/t Liz's conversational patterns).My point was that to get to any state you have to exercise some existing behaviour.
e.g. If you want to set the context that I have logged in, you must have the behaviour that someone can login. So I'd expect you to already have a scenario withWhen I loginand then you would use that behaviour inGiven I am logged in.
An important point here is that by 'use that behaviour' I DO NOT mean use the existing test code that exercises that behaviour, I just mean use in any way you choose the applications ability to log users in. (this includes short cutting directly to the databse if you must, but a well designed application should rarely require this.)
I'd be interested to know how When's express opinions about behaviour. It seems to me that When's just describe behaviour e.g. 'When I login, and only in combination with a Then can an opinion be formed e.g. Then I should be logged in
All bestAndrew
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Visit this group at http://groups.google.com/group/behaviordrivendevelopment.
For more options, visit https://groups.google.com/d/optout.
e.g. If you want to set the context that I have logged in, you must have the behaviour that someone can login. So I'd expect you to already have a scenario withWhen I loginand then you would use that behaviour inGiven I am logged in.Nope. Just a table with (user_id, logged_in). Or an in-memory set, or something.
An important point here is that by 'use that behaviour' I DO NOT mean use the existing test code that exercises that behaviour, I just mean use in any way you choose the applications ability to log users in. (this includes short cutting directly to the databse if you must, but a well designed application should rarely require this.)Again I’m going to disagree. The ability to set up a scenario quickly is orthogonal to the application quality. I will probably end up with helpers for the scenarios that make the common quick-and-dirty setup cases even quicker.
I'd be interested to know how When's express opinions about behaviour. It seems to me that When's just describe behaviour e.g. 'When I login, and only in combination with a Then can an opinion be formed e.g. Then I should be logged in"When I log in” is an opinion. It says logging in is how you get authorisation around here, rather than just having the doors wide open or restricting access based on e.g. an IP address or persisted token.“Then I should be logged in” is verification of that opinion.We are mostly arguing semantics at this point, but the important distinction is that implementing behaviour doesn’t need to happen in the narrative order of that behaviour. You can jump right in to the piece you think it will be most useful to go next, and fake anything you need upstream of it. My definition of “useful” is whether it will surface assumptions or missing pieces, reduce risk or provide a quick win that I can show to my stakeholders to get feedback.