--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Sat, Sep 21, 2013 at 6:31 PM, Kosmas <kos...@gmail.com> wrote:
Taken from the Manning Publications book 'Rails 4 In Action' there is a suggestion that the rails community has moved away from cucumber:
BDD is a methodology based on TDD. You write an automated test to check the interaction between the different parts of the codebase rather than testing that
each part works independently.
Two tools used for BDD when building Rails applications are RSpec and 3Cucumber, with this book heavily relying on RSpec and foregoing Cucumber .
Footnote 3 mCucumber was previously used in earlier editions of this book, but the community has drifted away from using it,
as there are other tools (like Capybara, mentioned later) that provide a very similar way to test, but in a much neater syntax.
There was also a blog post about it here:
http://blog.8thlight.com/kevin-liddle/2013/09/18/a-case-against-cucumber.html
Any ideas/suggestions if we could do anything?
I'm working on a blog post. I (and a lot of others) have been trying to explain this for years, but it's an uphill battle.We clearly need to continue to spread this message to stop people from getting the wrong impression.The gist of it is that contrary to popular belief, Cucumber was never meant to be a testing tool,but a communication/collaboration tool.When people see something new they don't recognise or understand they will always try to figure out what it is similar to.Cucumber is similar to a testing tool. So people have started to use it as a testing tool.Of course, it is terrible at that. Because it wasn't meant to be a testing tool.
If people stop using Cucumber for what it was never meant to be used for, that's a good thing.It doesn't serve the projects who need a testing tool, and it doesn't serve the Cucumber tool's reputation.To those of you who have no idea what the heck I'm talking about, just hang in there for the blog post.Aslak
I also read the above blog post yesterday. It's interesting because, while he has some good points, he misses important considerations for the long term.Anyways, here's where I agree with him:
- Absolutely agree with him that, if you have no product manager or stakeholder who will read (and help generate/review) the cukes, then writing them is a complete waste of time; instead write tests in your favorite TDD framework.
- Absolutely agree with him that Gherkin is a very useful technique to flesh out the requirements.
- Absolutely agree with him that there is a learning curve/overhead in using Cucumber to drive your tests:
- Agree with him that obvious requirements don't need to be cuke'd.
So where are my disagreements?
- Over the long haul, a comprehensive Cucumber suite provides an easy-to-access reference to what a complex system is required to do. Without it:
- Dead code lingers on because there is no easy way to tell whether it is needed or not.
- Harder to identify which code matches required functionality because required functionality is not tracked.
- TDD implementations are a mix of unit, functional, integration, and smoke tests; organizing them so that functional requirements are separated out is challenging. It takes a special additional discipline to organize this and make the TDD tests readable for non-technical people to make this work.
- My own experience is that the lack of this will cause a Rails system to become brittle over time. More and more time is spent trying to remember what the system is supposed to be doing.
- Not tying the cukes through step definitions to automate the tests means that the cukes are simply one more piece of documentation that gets out of date. Inaccurate documentation, Gherkin-based or not, is as perilous as dead code.
The Rails approach promotes the idea that the code itself is the reference. Many "agilistias" support this notion. Which is acceptable as long as the code is self-explanatory.
But it's when the code repeatedly changes that things get confusing. What's current? What's no longer current? One of the great banes of life for this developer is attempting to debug code that no longer has any functionality in the system.
If functionality never changed for a Rails system but only grew, I'm guessing that you would probably not need Cucumber. But I haven't found "only growing" to be reality; functionality is discarded and/or modified.There is no easy way to track functionality changes, but it's exceedingly important for a maintainable complex system. In our organization, we have gone back and forth between Cucumber and other strategies, and Cucumber wins out. If we can't explain important business functionality in a Cucumber, and we can't tie that Cucumber Gherkin code to automatically run regression tests for those features, then the organization hasn't done its job. Cucumber forces us to "think it through".That being said, it has been tempting to "short-circuit" Cucumber and, too often, not use it fully (or not at all). In such circumstances, it has cost us:
- A couple of developers have accumulated very high "bus numbers". They have way too much of the business logic in their heads, and increasingly they can't even remember what's current.
- New developers are slowed down by not having the information in a reliably-maintained set of external requirements.
- Product managers have a difficult time communicating when a cuke-precise document isn't available to collaborate around.
- As a result, much time is spent
- Trying to determine requirements.
- Debugging at the system level rather than at the unit level.
- Figuring out what code should be removed.
- Tracking down and correcting bad data.
- and as a result, it has become increasingly difficult to accurately project sprint velocity in areas where we haven't been 'cuke-diligent'.
So our struggle is to use Cucumber to flesh out business requirements and to attach those to automated regression tests. When we use it, life is good. When we don't, well...
The gist of it is that contrary to popular belief, Cucumber was never meant to be a testing tool,but a communication/collaboration tool.
On Saturday, September 21, 2013 2:13:31 PM UTC-5, Aslak Hellesøy wrote:The gist of it is that contrary to popular belief, Cucumber was never meant to be a testing tool,but a communication/collaboration tool.
Well, to be fair, the Cucumber Book has sentences like this:"What makes Cucumber stand out from the crowd of other testing tools is thatit has been designed specifically to ensure the acceptance tests can easily beread—and written—by anyone on the team."When people see "stand out from the crowd of OTHER testing tools," it clearly lumps Cucumber into that category.
Here's another line from the book (in section 4.5):"Cucumber is a testing tool, and it’s in the Ruby code of a step definition whereour tests find out whether a step has succeeded in whatever it set out to do."So, it's not all that hard to see why people might think Cucumber is thought of as a testing tool when the very book used to promote it says exactly that.
- Jeff
When I said that "Cucumber was not meant to be a testing tool" that was a simplification to make an important point: Testing is not its primary purpose.
You have taken a couple of paragraphs out of context here. We have done our best to communicate that Cucumber is more than a testing tool. Perhaps we should have made it more clear that if you use it *only* as a testing tool you will probably be in a better place if you pick a tool that is *only* a testing tool.
On Saturday, September 28, 2013 3:33:08 PM UTC-5, Aslak Hellesøy wrote:When I said that "Cucumber was not meant to be a testing tool" that was a simplification to make an important point: Testing is not its primary purpose.You have taken a couple of paragraphs out of context here. We have done our best to communicate that Cucumber is more than a testing tool. Perhaps we should have made it more clear that if you use it *only* as a testing tool you will probably be in a better place if you pick a tool that is *only* a testing tool.
What I did is quote paragraphs that people read and they certainly were not taken "out of context." Another example from the book is:"Like most other testing tools, Cucumber uses exceptions to communicate the failure of a test."Certainly in the book it is mentioned that Cucumber is not "just" a testing tool but also a collaboration tool. So perhaps you meant that my quotes were selective, rather than out of context.
Yet in the book it is clear that Cucumber is treated, at least in part, AS a testing tool. And here's the thing: for those of us that realize testing is a design activity, and not just an execution activity, the distinction does not matter that much because testing, as a design activity, is all about collaboration. You are testing people's understanding of a shared notion of quality as it gets encoded as actionable statements that you can call acceptance tests. Calling Cucumber a testing tool is actually NOT a bad thing, as long as people have a broad view of testing and realize that testing is a multi-faceted activity. (I realize many people may not treat testing, as a concept and activity, in this way. In that case, I would rather educate on _that_ issue instead of worrying about whether something is or is not a testing tool.)
My point was simply that there can be mixed messages possible based on what people read in the Cucumber Book and this is also going to be predicated upon their view of testing. So when you say "Cucumber was never meant to be a testing tool" and a book says (direct quote) "Cucumber is a testing tool" -- you have to expect a certain amount of confusion, even if other parts of the book state that Cucumber should be used for collaboration instead of "just" testing.
So even if you want to say "Cucumber should not be used solely as a testing tool", then I would prepare to also make distinctions for those in quality assurance and business analysis who know that testing is, again, both a design activity and an execution activity.
Aslak I love the points you make here. I've fallen into this trap when I train on BDD the group typically turns out to be just programmers and testers. It's important to train them but I want to move to more "up front" training and get the POs involved and maybe build a Product Owner training modifying my typical User Story writing workshop and adding in gherkin and the flow you describe about. Have you guys done training like this? - wait don't answer that I think it'll take this thread in a different direction.
On 28 Sep 2013 21:33, "aslak hellesoy" <aslak.h...@gmail.com> wrote:
>
> On Sat, Sep 28, 2013 at 11:44 AM, Jeff Nyman <jeff...@gmail.com> wrote:
>>
>>
>> On Saturday, September 21, 2013 2:13:31 PM UTC-5, Aslak Hellesøy wrote:
>>>
>>>
>>> The gist of it is that contrary to popular belief, Cucumber was never meant to be a testing tool,
>>> but a communication/collaboration tool.
>>>
>>
>> Well, to be fair, the Cucumber Book has sentences like this:
>>
>> "What makes Cucumber stand out from the crowd of other testing tools is that
>> it has been designed specifically to ensure the acceptance tests can easily be
>> read—and written—by anyone on the team."
>>
>> When people see "stand out from the crowd of OTHER testing tools," it clearly lumps Cucumber into that category.
>>
>
> When I said that "Cucumber was not meant to be a testing tool" that was a simplification to make an important point: Testing is not its primary purpose.
>
> Cucumber is a tool with multiple facets:
>
> 1) Collaboration between BAs, testers and programmers
> 2) Outside-In development
> 3) Automated testing
In my opinion there is a fourth point (if steps are written in a declarative way):
4) Live Documentation
I know (1) and (2) are the main reasons to choose Cucumber over Fitnesse, Robot Framework, etc. but (3) and (4) are quite important as well.
On Sat, Sep 28, 2013 at 11:00 PM, Marty Bradley <marty.ag...@gmail.com> wrote:
Aslak I love the points you make here. I've fallen into this trap when I train on BDD the group typically turns out to be just programmers and testers. It's important to train them but I want to move to more "up front" training and get the POs involved and maybe build a Product Owner training modifying my typical User Story writing workshop and adding in gherkin and the flow you describe about. Have you guys done training like this? - wait don't answer that I think it'll take this thread in a different direction.No, that's fine - I think it's on-topic.I don't do training myself, but there are several people on this list who do. It would be interesting to hear their experience with this - training Product Owners and Business Analysts. I think it's essential in order to succeed with Executable Specifications and BDD.