To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com <mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------
--
Posting rules: http://cukes.info/posting-rules.html
--- You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
The Cucumber logo is the intellectual property of Cucumber Ltd, a limited company registered in Scotland, number 456793.
UK Headquarters: Cucumber Ltd, Drumsyniebeg, Lochgoilhead, Cairndow, Argyll, PA24 8AN UK.
CONFIDENTIALITY NOTICE: The information in this e-mail is confidential and privileged; it is intended for use solely by the individual or entity named as the recipient hereof. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient is strictly prohibited and may violate applicable laws. If you have received this e-mail in error, please delete the original message and notify us by email immediately. Thank you. Cucumber Ltd.
Andrew,
I'm not exactly sure what you mean by this. Can you give an example of extracting the spirit/meaning of the examples and naming them?
- George
On 9/14/17 10:15 AM, Andrew Premdas wrote:
This ties in quite nicely with my idea/opinion that any Cucumber scenario that has examples in it, particularly tables is in some way incomplete.
You complete the scenario by extracting the spirit/meaning of the examples and in the process name things. When you have done this all the tables of examples just disappear and you are left with named concepts specific to your context.
All best
Andrew
from it, send an email to cukes+unsubscribe@googlegroups.com
<mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
-- Posting rules: http://cukes.info/posting-rules.html
<http://cukes.info/posting-rules.html>
---
You received this message because you are subscribed to the
Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to cukes+unsubscribe@googlegroups.com
<mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
-- Posting rules: http://cukes.info/posting-rules.html
<http://cukes.info/posting-rules.html>
---
You received this message because you are subscribed to the Google
Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to cukes+unsubscribe@googlegroups.com
<mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
------------------------
Andrew Premdas
blog.andrew.premdas.org <http://blog.andrew.premdas.org>
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com <mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------
--
Posting rules: http://cukes.info/posting-rules.html
--- You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
Nice example, Andrew. I have found that when using tables for password rules I needed a <reason> column to explain which rule was being tested. That's a sure sign to me that a different scenario is beneficial.
I was at a client recently and they were delighted that they could use Scenario Outlines rather than repeating the scenario. The issue had to do with different legal requirements in different states. I don't remember the details, so these made up examples will have to suffice.
Scenario Outline: State requirements for Spouse as SNI
Given the Primary Named Insured resides in <state>
And the Secondary Named Insured has a relationship of "Spouse"
When the Agent views the policy
Then there is no option to remove the Secondary Named Insured
Examples:
| state |
| AL |
| AK |
Scenario Outline: No state requirements for Spouse as SNI
Given the Primary Named Insured resides in <state>
And the Secondary Named Insured has a relationship of "Spouse"
When the Agent views the policy
Then the Agent can remove the Secondary Named Insured
Examples:
| state |
| SC |
| SD |
As I recall, there were other state-oriented scenarios with value limits, but I can't recall them well enough to generate examples.
I can certainly see how the above could be written as individual scenarios, but it was both more convenient and less error prone to implement it with tables.
- George
<mailto:aslak.hellesoy@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com<mailto:gabriel.pa.oliveira@gmail.com>
--
Posting rules: http://cukes.info/posting-rules.html
--- You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rather than an special 'reason' column this is a situation where I would suggest you make use of the fact that scenario outlines can accept more than a single set of examples, and that the Examples: keyword can have other text after it. e,gScenario Outline: Users are not allowed to use weak or 'bad' passwords when changing their passwordsteps..Examples: Password contains username
example tableExamples: Password too short
example tableExamples: Password lacks complexityexample tableExamples: reusing prior or recent passwordexample table
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andrew,
On 9/16/17 11:31 AM, Andrew Premdas wrote:
I find it quite interesting to expand scenarios like this and then look into refactoring them with the aim to uncover business concepts rather than make my scenarios concise.
In this example it seems that there is a simple concept
in some states you can remove the secondary named insured
in other states you can't
What you examples here are doing is wasting large amounts of run time to repeat something that does not need repeating.
As far as the UI is concerned we only need 2 scenarios
1. A scenario that shows there is an option to remove the secondary named insured
2. A scenario that shows that option isn't present
Were we only concerned with machines, I would agree with you. But we're also concerned with people. And some of those people are focused on business risk rather than technical risk. If the scenarios do not make plain the things those people care about, then the scenarios are not doing their job. In this example, the concern is less about making the scenarios concise than it is about making the example clearly express the actual needs, as perceived by the Three Amigos and the constituencies they represent.
As for testing whether a particular state is a removing state or not, you can do that in a unit test that runs 100 times faster. >
Now you only have two states in your examples, but it would be very easy to add more and if you apply that across multiple scenarios in a large application you can see why people end up with cukes that have huge run times.
And those unit tests might as well be greek to the business people. They would be back to testing all of these things by hand.
Scenarios don't have to be tied to the UI, and don't have to run slowly. Given the nature of this particular project (a portal that integrates a number of back-end systems) I suspect they will be, for the most part, but I've encouraged them to organize their javascript so that some can be tested without deploying to a server.
<mailto:aslak.hellesoy@gmail.com>
<mailto:aslak.hellesoy@gmail.com <mailto:aslak.hellesoy@gmail.com>>
<mailto:aslak.hellesoy@gmail.com
<mailto:aslak.hellesoy@gmail.com>
<mailto:aslak.hellesoy@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:cukes%2Bunsubscribe@googlegroups.com>.send an email to cukes+unsubscribe@googlegroups.com
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
------------------------
Andrew Premdas
blog.andrew.premdas.org <http://blog.andrew.premdas.org>
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com <mailto:cukes+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------
--
Posting rules: http://cukes.info/posting-rules.html
--- You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
On 18 Sep 2017, at 02:31, Andrew Premdas <apre...@gmail.com> wrote:
As for testing whether a particular state is a removing state or not, you can do that in a unit test that runs 100 times faster. >
Now you only have two states in your examples, but it would be very easy to add more and if you apply that across multiple scenarios in a large application you can see why people end up with cukes that have huge run times.
And those unit tests might as well be greek to the business people. They would be back to testing all of these things by hand.I have no concern that my unit tests or my integration tests are greek to business people. That is expected. The only thing my tests MAY have to do is communicate to business people that their intentions are being met. If business people are reading the output of Cucumber scenarios and using them to determine whether their application functions or not then they are idiots or completely misinformed. A cucumber scenario in itself going green is completely meaningless, as every scenario will go green with no code. Cucumber scenarios are just a way for business people to contribute to the drive for development. Their executions proves nothing.
No matter how I implement my scenarios they and their output will never be understood by business users in the same way that the code of my application won't be understood by business users. My implemented scenarios are code and their output is not for business users it is for the developers who will have to build open the provided functionality. This idea that you can use the output of cucumber scenarios to judge the health of an application baffles me. If your a business person and you want to judge the health of an application look at the application not a wall of green text from cucumber scenarios.
Scenarios don't have to be tied to the UI, and don't have to run slowly. Given the nature of this particular project (a portal that integrates a number of back-end systems) I suspect they will be, for the most part, but I've encouraged them to organize their javascript so that some can be tested without deploying to a server.Scenarios will always run slowly as they are by definition abstract descriptions of the behaviour of an application described via its user interface. The fact that I can run several hundred scenarios over my application in 3 minutes in a single process on my laptop with a browser doing the javascript does not effect this. I could run 10 times the number of unit test in a few seconds IF I wrote them as well as I write my scenarios. Wasting scenario runtime to test/exercise things that have already been exercised is really detrimental to the overall effectiveness of using Cucumber to drive development.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
On 18 Sep 2017, at 02:31, Andrew Premdas <apre...@gmail.com> wrote:
As for testing whether a particular state is a removing state or not, you can do that in a unit test that runs 100 times faster. >
Now you only have two states in your examples, but it would be very easy to add more and if you apply that across multiple scenarios in a large application you can see why people end up with cukes that have huge run times.
And those unit tests might as well be greek to the business people. They would be back to testing all of these things by hand.I have no concern that my unit tests or my integration tests are greek to business people. That is expected. The only thing my tests MAY have to do is communicate to business people that their intentions are being met. If business people are reading the output of Cucumber scenarios and using them to determine whether their application functions or not then they are idiots or completely misinformed. A cucumber scenario in itself going green is completely meaningless, as every scenario will go green with no code. Cucumber scenarios are just a way for business people to contribute to the drive for development. Their executions proves nothing.No matter how I implement my scenarios they and their output will never be understood by business users in the same way that the code of my application won't be understood by business users. My implemented scenarios are code and their output is not for business users it is for the developers who will have to build open the provided functionality. This idea that you can use the output of cucumber scenarios to judge the health of an application baffles me. If your a business person and you want to judge the health of an application look at the application not a wall of green text from cucumber scenarios.If the output of Cucumber is meaningless to the people who require the software why bother going to the effort of automating a Gherkin scenario? Why add that layer that translate the Gherkin to code? You say their value is to contribute to driving the development. Couldn’t you achieve that simply by using concrete examples in conversations and then translating them to a RSpec or JUnit, etc. Why are we writing in English (or other natural language) if these things aren’t meant to be read by people. If they are only meant for developers code is a less ambiguous to way to specify things.
Cucumber & Gherkin has 3 values1) Executable specifications based on concrete examples – this is how we are able to consider the business rules and discuss whether they meet our (users’) needs, and because we specify software before we write it they fit naturally into a TDD process2) Automated tests – as software is delivered, executable specs form part of our regression suite. We learn quickly if new changes have effected earlier work, and we can decide if this is expected or not3) Documentation - these executable specifications, written in (almost) natural language, can document what our software does. This is valuable to people on the team and people outside of the teamThere’s always a balance that needs to be struck between these three values, and its down to each team to strike the right balance for themselves. I do think though that the hardest to balance are automated tests and documentation. Automated tests push us to brevity and the minimum required as we get concerned with run length. Documentation screams for concrete examples, for richness to interest a reader.
Scenarios don't have to be tied to the UI, and don't have to run slowly. Given the nature of this particular project (a portal that integrates a number of back-end systems) I suspect they will be, for the most part, but I've encouraged them to organize their javascript so that some can be tested without deploying to a server.Scenarios will always run slowly as they are by definition abstract descriptions of the behaviour of an application described via its user interface. The fact that I can run several hundred scenarios over my application in 3 minutes in a single process on my laptop with a browser doing the javascript does not effect this. I could run 10 times the number of unit test in a few seconds IF I wrote them as well as I write my scenarios. Wasting scenario runtime to test/exercise things that have already been exercised is really detrimental to the overall effectiveness of using Cucumber to drive development.I disagree with your definition that scenarios must run against a user interface. Scenarios are concerned with being business readable. Some of them will run end-to-end, but they don’t need to.
All bestAndrew
<mailto:lists@idiacomputing.com
<gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>
<mailto:gabriel.pa.oliveira@gmail.com
<mailto:gabriel.pa.oliveira@gmail.com>>>> wrote:
Hi Aslak,
Thanks for pointing this out - this was a
mistake on
our part.
The intent was to state that fact that bad
requirements
are one
of the many causes of project failures.
Already fixed on bit.ly/bdd_quality
<http://bit.ly/bdd_quality>
<http://bit.ly/bdd_quality> <http://bit.ly/bdd_quality>
On Wed, Sep 13, 2017 at 11:03 PM, Aslak Hellesøy
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com<mailto:cukes+unsub...@googlegroups.com>.
Andrew,
It's possible to hide too much, and lose the advantages of concrete
examples.
On 9/16/17 11:48 AM, Andrew Premdas wrote:
>
>
> On 15 September 2017 at 17:37, Chuck van der Linden <sqa...@gmail.com
> <mailto:sqa...@gmail.com>> wrote:
>
>
> Rather than an special 'reason' column this is a situation where I
> would suggest you make use of the fact that scenario outlines can
> accept more than a single set of examples, and that the Examples:
> keyword can have other text after it. e,g
<snip>
>
> This has two flaws from my perspective
>
> 1. Its harder to read and debug.
>
> 2. It still keeps the example data in the feature file. This is the
> really important point.
>
> I much prefer to extract examples out of scenarios getting them from
> either step definition helpers or the application itself (if possible).
> The thing with example data in scenarios is that when the rules change
> the scenario has to change.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.