Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, the pattern that you are using is based on Cucumber - here's a <a href="http://cukes.info/" rel="nofollow noreferrer">link</a>. The style is from the BDD (Behavior-driven development) approach. It has two advantages over traditional TDD:</p> <ol> <li>Language - one of the tenants of BDD is that the language you use influences the thoughts you have by forcing you to speak in the language of the end user, you will end up writing different tests than when you write tests from the focus of a programmer</li> <li>Tests lock code - BDD locks the code at the appropriate level. One problem common in testing is that you write a large number of tests, which makes your codebase more brittle as when you change the code you must also change a large number of tests too. BDD forces you to lock the behavior of your code, rather than the implementation of your code. This way, when a test breaks, it is more likely to be meaningful.</li> </ol> <p>It is worth noting that you do not have to use the Cucumber style of testing to achieve these affects and using it does add an extra layer of overhead. But very few programmers have been successful in keeping the BDD mindset while using traditional xUnit tools (TDD).</p> <p>It also sounds like you have some scenarios where you would like to say 'When I do , then verify '. Because the current BDD xUnit frameworks only allow you to verify primitives (strings, ints, doubles, booleans....), this usually results in a large number of individual tests (one for each Assert). It is possible to do more complicated verifications using a <a href="https://stackoverflow.com/a/10535414/1335105">Golden Master</a> paradigm test tool, such as <a href="http://www.approvaltests.com" rel="nofollow noreferrer">ApprovalTests</a>. Here's a <a href="http://www.youtube.com/watch?v=vKLUycNLhgc" rel="nofollow noreferrer">video example</a> of this. </p> <p>Finally, here's a link to Dan North's <a href="http://dannorth.net/" rel="nofollow noreferrer">blog</a> - he started it all.</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. VO
      singulars
      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