Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Find someone who is interested in the user posting the article, and <em>talk to them</em> about the scenarios. Whatever focus they have is probably the focus you should use.</p> <p>For instance, they will probably say,</p> <pre><code>Given there's a user who likes horses And they're already logged in When they add a post Then it should be visible to other people who like horses </code></pre> <p>etc.</p> <p>The language is very informal. I encourage you to keep their words as much as possible. Business people definitely won't be talking in terms of clicking the post, creating user models, etc. You can make the code underneath this do whatever is necessary to make your business's scenarios work.</p> <p>If something is a "Given", do whatever is easy to make it work. Maybe that's hacking data or knocking up a user model; maybe that's clicking a page. If you get it wrong you will be able to change later without changing the scenarios, so it should be OK to try whatever is easy. Automating UIs is slow, so you might eventually decide to use data or a model, but if you do this later on you'll have a better idea of what the data/model will look like anyway.</p> <p>The "When" is the event that causes the behavior you're interested in - in this instance, "When they add a post". You should always do this from the highest level you can - some people like to automate the UI, others the controllers, but this is basically the core of your scenario, so you shouldn't be hacking data in here.</p> <p><a href="http://lizkeogh.com/2011/09/22/conversational-patterns-in-bdd/" rel="nofollow noreferrer">Here's an article I wrote</a> about using BDD to have conversations which I think will be useful to you. You might also like this one, <a href="http://lizkeogh.com/2011/03/04/step-away-from-the-tools/" rel="nofollow noreferrer">"Step Away from the Tools"</a>, or <a href="https://stackoverflow.com/questions/767439/are-bdd-tests-acceptance-tests/4248991#4248991">this rant I wrote on StackOverflow</a> a while back.</p> <p>The most important thing about BDD is to <em>talk to people</em>, though. Please try to do that and not let the tools prevent you from doing it!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload