HuddleEng / PhantomFlow

Describe and visualise user flows through tests with PhantomJS
MIT License
682 stars 60 forks source link

Gherkin implementation #18

Closed jgautheron closed 9 years ago

jgautheron commented 9 years ago

In your original idea of fluent communication, implementing the Gherkin language would allow the non-technical team member to write testing scenarios on their own.

jamescryer commented 9 years ago

I played with the idea of visualizing Gherkin style tests but it didn't work well. I also, personally don't buy into non-technical members writing tests. My own experience of Cucumber is that the emphasis on natural language makes test implementation less easy to maintain, which as a developer is the most important thing for me. Decision trees map closely to my own model of state-full UI traversal, and they make really cool diagrams!

Given-When-Then is a really clear way of defining high-level functionality, and a simple way to communicate specifications. But, for me at least, a visualized user flow will always be easier to read and understand. And surprisingly useful in code and product reviews.

jgautheron commented 9 years ago

Thanks for sharing your thoughts. In my case it would actually to allow non-technical members to reproduce scenarios of their own (not really about writing tests - my mistake) in the order of their choice. In that context, Gherkin just makes things more understandable. Ex.

  1. Add random product to cart
  2. Change random product options
  3. Add another random product
  4. Remove random Product
  5. Add option to cart
  6. Switch language
  7. etc...

But that's out of the context of PhantomFlow as it currently is, so I'll close the issue.