<?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>Most Of Each Test Case Exercises A Small Fraction Of The Code</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx</link><description>The execution section of a test case is itself composed of three subsections: setup, execution, and teardown. Execution is often thought to be the most important part of a test case (after all, a test case that doesn’t verify anything is rather pointless</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>From Accountant To Scientist</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx#447249</link><pubDate>Wed, 03 Aug 2005 20:45:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:447249</guid><dc:creator>The Braidy Tester</dc:creator><description>In many of my posts I have alluded to the automation stack my team is building, but I have not provided...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=447249" width="1" height="1"&gt;</description></item><item><title>From Accountant To Scientist</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx#441013</link><pubDate>Wed, 20 Jul 2005 20:32:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:441013</guid><dc:creator>The Braidy Tester</dc:creator><description>In many of my posts I have alluded to the automation stack my team is building, but I have not provided...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=441013" width="1" height="1"&gt;</description></item><item><title>re: Most Of Each Test Case Exercises A Small Fraction Of The Code</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx#416523</link><pubDate>Wed, 11 May 2005 19:33:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:416523</guid><dc:creator>humbugreality</dc:creator><description>You're both correct - &amp;quot;all&amp;quot; is a (rather big? &amp;lt;g/&amp;gt;) bit of an overstatement, especially when it comes to data values. The great phrases Michael suggests are a much better description of what I was trying to say.&lt;br&gt;&lt;br&gt;Pete: &amp;quot;...let's say that you can define a finite number of execution paths and data values and execute them without writing additional test cases -- that would be cool!&amp;quot; I'm saying you can do exactly that; more details coming soon to a blog near you! This and your other questions should be answered by the end of this series. If they aren't, though, let me know and I'll expand further.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=416523" width="1" height="1"&gt;</description></item><item><title>re: Most Of Each Test Case Exercises A Small Fraction Of The Code</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx#416162</link><pubDate>Wed, 11 May 2005 00:31:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:416162</guid><dc:creator>PeteVanC</dc:creator><description>I don't believe you :)  In general using all possible execution paths and data values is not possible (in a finite amount of time).&lt;br&gt;&lt;br&gt;For example you describe the following test case in a previous blog entry:&lt;br&gt;&lt;br&gt;Typing Alt to invoke the main menu, repeatedly pressing the left arrow key until the File menu is selected, repeatedly pressing the down arrow key until the New submenu item is selected, pressing the left arrow key a single time to expand the New submenu, repeatedly pressing the down arrow key until the New Document menu item is selected, then pressing Enter to invoke the New Document menu item.&lt;br&gt;&lt;br&gt;What if I press the left arrow key followed by the right arrow key, followed by the left arrow key, nearly forever before finishing the setup?&lt;br&gt;&lt;br&gt;In that same blog entry you describe 8 different ways to perform the test's setup.  What about mixing and matching snippets from the various different ways and undoing and redoing those snippets in different combinations nearly forever before finishing the setup?&lt;br&gt;&lt;br&gt;How do you ensure that hardware failures or other non-software failures are properly executed? &lt;br&gt;&lt;br&gt;That said, let's say that you can define a finite number of execution paths and data values and execute them without writing additional test cases -- that would be cool!&lt;br&gt;&lt;br&gt;I'm assuming here that someone needs to at least define the set of execution paths and data values -- is that correct?&lt;br&gt;&lt;br&gt;And then someone also needs to verify that the execution paths and data values correctly perform the setup, teardown, or other part of the test case -- but I guess these might not be defined as additional test cases.&lt;br&gt;&lt;br&gt;When the test is run, are all the possible exection paths and data values excersized at once, or only across a set of similar test cases?&lt;br&gt;&lt;br&gt;In any case, how do you ensure that they all get performed within a reasonable amount of time?  I imagine that any sufficiently robust combination would quickly become quite large.&lt;br&gt;&lt;br&gt;Anyway, it was cool to see your picture in the profiles -- although I had imagined you differently.&lt;br&gt;&lt;br&gt;Lastly, a caveat -- I haven't read all of your previous posts on this subject so it's possible that I'm not fully grasping the context of your statements.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=416162" width="1" height="1"&gt;</description></item><item><title>re: Most Of Each Test Case Exercises A Small Fraction Of The Code</title><link>http://blogs.msdn.com/b/micahel/archive/2005/05/09/mostofeachtestcaseexercisesasmallfractionofthecode.aspx#415955</link><pubDate>Tue, 10 May 2005 10:28:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:415955</guid><dc:creator>Michael Bolton</dc:creator><description>Pardon my skepticism, but I'd be surprised if you have a method that uses /all/ possible execution paths and data values--it ain't possible.&lt;br&gt;&lt;br&gt;In a previous posting, you did (IMO) a very good job of identifying something that most people ignore, which is that there are plenty of ways to open a file--via the File / Open menu with keyboard, File / Open with mouse, clicking on the file in Explorer, using the &amp;quot;start foo.doc&amp;quot; syntax from the command line, and so on and so forth.  Far more than most testers will identify unless they're pushed, and unless they brainstorm for a while.&lt;br&gt;&lt;br&gt;Your claim would be entirely credible if you said &amp;quot;a good variety&amp;quot; or &amp;quot;a large number&amp;quot; or &amp;quot;reasonably good coverage&amp;quot;, but &amp;quot;all&amp;quot; isn't possible.  For example, using Word:&lt;br&gt;&lt;br&gt;Type Alt-F.  Click on Open.  Tab into the file list.  Select the filename such that it appears in the filename combo box.  Backspace over the extension.  Change your mind, and type the extension again.&lt;br&gt;&lt;br&gt;Click on File.  Click on Open.  Click on the filename.  Backspace over the extension.  Change your mind, and type the extension again.&lt;br&gt;&lt;br&gt;Click on File.  Type O for open.  Tab down to the filename combo box.  Hit the down-arrow key.  Select a file that looks interesting.  Hit the right-arrow key.  Hit backspace.  Hit the down arrow key.  &lt;br&gt;&lt;br&gt;Take all those cases, and vary ad infinitum.  Instead of tabbing to the filename combo box, tab past it and keep tabbing until you get there again.  Now shift-tab until you're back to square one.  Now click.  Et cetera.&lt;br&gt;&lt;br&gt;Now:  it may seem unreasonable that I would quibble over the use of the word &amp;quot;all&amp;quot;.  However, I contend that bugs are unreasonable, and will appear in lots of places that reasonable approaches won't find.  Naturally, risk should drive the decision as to how recherche we want to get, but there will sometimes be bugs beyond that frontier.&lt;br&gt;&lt;br&gt;The funny thing is that, in writing this up and reproducing the steps above, I've managed to find a bug in Word.  It may be related to the fact that earlier, when I opened Word, I double-clicked on a filename twice (that's four clicks), really fast, such that I opened the file for a second time before the first instance was open.  This led to complaints about Normal.dot being corrupted or some such.  In any case, I've just now managed to get Word (2000) into a state where it's open, sort-of, but flashing on the task bar and won't stop until (I presume) I kill the process.  That's a hang--a high-severity, pain in the ass bug.&lt;br&gt;&lt;br&gt;My point is that a claim of &amp;quot;lots&amp;quot; is defensible; that &amp;quot;what we consider to be excellent coverage&amp;quot; is defensible; that &amp;quot;we've addressed what we consider to be the most important risks&amp;quot; is highly defensible; and even &amp;quot;in our test suite, we cover a lot of varying ways in a user could reasonably accomplish the same task, unlike just about every other test automation implementation on the planet.&amp;quot;  Those are great things, but they're not &amp;quot;all&amp;quot;.&lt;br&gt;&lt;br&gt;---Michael &amp;quot;So you think YOU'RE a pedant?!&amp;quot; B.&lt;br&gt;DevelopSense:  Software Testing in Plain English&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://www.developsense.com"&gt;http://www.developsense.com&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=415955" width="1" height="1"&gt;</description></item></channel></rss>