Behavior-driven development: Difference between revisions

Content deleted Content added
Secret9 (talk | contribs)
Wesley (talk | contribs)
Line 138:
==Test first, implement next==
 
As with most agile development techniques Behavior Driven Development promotes a short test/implement/improve cycle. Testing before implementatingimplementing is a crucial aspect of Behavior Driven Development.
 
===Test===
Line 153:
</nowiki></pre>
 
After writing the test the project should compile correctly. This means the <code>PrimeCalculator</code> and <code>EratosthenesPrimesCalculator</code> classes should exist and souldshould have a <code>nextPrime()</code> method. [[Integrated Development Environment]] (IDE) tools can help with this by creating those classes and methods that are missing in the project. The code below is generated by an IDE:
 
<pre><nowiki>
Line 170:
 
===Implement===
Once the behavioral test compiles, the classes that are tested may be implemented (preferably before other tests are written). Their implementation is finished when the behavioral tests workswork without failing. The behavioral tests are fixtures that can be used as bearings for developers to know when the implementation behaves as expected.
 
===Improve===
When the behavioral test works correctly, developers may improve the implementation to work more efficiently. This can happen right after the implementation or at a later time.
 
==Setting behavioral priorities==