﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Sudheer Palyam / Article Discussions / Article Discussions by Author </title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 24 May 2012 12:38:55 GMT</lastBuildDate><ttl>20</ttl><item><title>An Introduction to Test Driven Development</title><link>http://www.sqlservercentral.com/Forums/Topic250107-276-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/sPalyam/anintroductiontotestdrivendevelopment.asp"&gt;http://www.sqlservercentral.com/columnists/sPalyam/anintroductiontotestdrivendevelopment.asp&lt;/A&gt;</description><pubDate>Wed, 11 Jan 2006 17:42:00 GMT</pubDate><dc:creator>cutespn</dc:creator></item><item><title>RE:</title><link>http://www.sqlservercentral.com/Forums/Topic256947-276-1.aspx</link><description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;There is a cardinal mistake in the artcle about the TDD flow. &lt;/P&gt;&lt;P&gt;You wrote:&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;EM&gt;In TDD, we follow the steps below.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Create the test case for testing each tiny bit of functionality. &lt;/EM&gt;&lt;LI&gt;&lt;EM&gt;Run this test ( it will fail the first time as there is no code for this functionality.) &lt;/EM&gt;&lt;LI&gt;&lt;EM&gt;Write only the code to pass the test cases. &lt;/EM&gt;&lt;LI&gt;&lt;EM&gt;Run the test case again &lt;/EM&gt;&lt;LI&gt;&lt;EM&gt;&lt;FONT color=#ff1111&gt;&lt;STRONG&gt;If the test case fails refractor the code to pass the test case &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, in TDD you *never* refactor to make a test pass! You should get the test to pass in the simplest way (sometimes even by "cheating" with a hardcoded result), and then refactor only while all test are passing. This makes sure you'r refactorings are always just "refactoring" (i.e. just changing the structure of the code without changing behaviour), while assuring that you *always* have code that works (even if it's still being refactored).&lt;/P&gt;&lt;P&gt;Nevertheless I was happy to see this article on SQLServerCentral, and especially glad to hear about the TSQL perspective. (I've been doing TSQL TDD manually for several months now, without any framework.. it's definitely hard but worthwhile. &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;)&lt;/P&gt;&lt;P&gt; - Avi&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Thu, 09 Feb 2006 00:23:00 GMT</pubDate><dc:creator>avi_a</dc:creator></item></channel></rss>
