<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx</link><description>If during a dev interview, you're asked to write a set of test cases for some function you wrote, be sure to have test cases that reach every basic block. In other words, make sure your test cases at least hit every line of code you wrote. For example,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1233727</link><pubDate>Thu, 07 Dec 2006 21:27:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1233727</guid><dc:creator>Peter Ritchie</dc:creator><description>&lt;p&gt;Interesting. &amp;nbsp;What spawned this? Did a recent candidate horribly bomb?&lt;/p&gt;
</description></item><item><title>re: Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1235323</link><pubDate>Fri, 08 Dec 2006 01:45:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1235323</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;I've seen it a few times &amp;nbsp;:(&lt;/p&gt;
</description></item><item><title>Interesting Finds: December 7, 2006</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1236091</link><pubDate>Fri, 08 Dec 2006 05:01:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1236091</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>re: Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1258595</link><pubDate>Mon, 11 Dec 2006 14:15:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1258595</guid><dc:creator>Adel</dc:creator><description>&lt;p&gt;Many thanks, hope you can write more in testing, or giving me some recommended resources.&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;</description></item><item><title>re: Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1559046</link><pubDate>Wed, 31 Jan 2007 00:19:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1559046</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Rule #1 seems to be inadequate, according to Mr Myers' book, &amp;quot;the Art of Software Testing&amp;quot;.&lt;/p&gt;
&lt;p&gt;Mr Myers explains that the criterion of &amp;quot;execute every statement in the program at least once&amp;quot; is weak for a reasonable white-box test. (please, see pp. 44-45 of the aforementioned book for examples).&lt;/p&gt;
&lt;p&gt;A stronger criterion is known as decision coverage or branch coverage. This criterion states that you must write enough test cases that each decision has a true and a false outcome at least once.&lt;/p&gt;</description></item><item><title>re: Interview Tip: Writing test cases</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/07/interiew-tip-testing.aspx#1570572</link><pubDate>Thu, 01 Feb 2007 09:36:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1570572</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;Ron - I agree that the rules above are insufficient. I'm just laying out a quick minimum bar that you'd better at least hit in an interview. (kind of like, don't trip over your shoelaces)&lt;/p&gt;
&lt;p&gt;Hitting every line is definitely not the same as fulling testing all code paths.&lt;/p&gt;
</description></item></channel></rss>