<?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>The Galactic Patrol : Software Testing</title><link>http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx</link><description>Tags: Software Testing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Software Testing on Mars</title><link>http://blogs.msdn.com/bwill/archive/2004/02/10/70451.aspx</link><pubDate>Tue, 10 Feb 2004 12:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:70451</guid><dc:creator>bwill</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/bwill/comments/70451.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=70451</wfw:commentRss><description>&lt;div class="Section1"&gt; &lt;p&gt;&lt;a href="http://www.testgeek.com/cgi-bin/blosxom.cgi/2004/01/27#MarsRoverBug"&gt;Here is an interesting summary&lt;/a&gt; of the problem encountered by the Spirit probe on Mars.&amp;nbsp; Important test lessons:&lt;/p&gt; &lt;p&gt;&amp;ldquo;&lt;b&gt;&lt;span style='font-weight:bold'&gt;test real-world conditions&lt;/span&gt;&lt;/b&gt;&amp;rdquo;&lt;/p&gt; &lt;p&gt;&amp;ldquo;&lt;b&gt;&lt;span style='font-weight:bold'&gt;run long-haul stress tests&lt;/span&gt;&lt;/b&gt;&amp;rdquo;&lt;/p&gt; &lt;p style='margin-left:.5in'&gt;&lt;span style=''&gt;&amp;ldquo;SYSTEM BEHAVIOR: Spirit began acting up last week, when it stopped sending data and began rebooting its computer, resetting it roughly 130 times. At one point, the rover thought it was 2053.&lt;/span&gt;&lt;/p&gt; &lt;p style='margin-left:.5in'&gt;&lt;span style=''&gt;BUG DESCRIPTION: Engineers found that the rover's 256 megabyte flash memory had retained hundreds of files containing flight data and was still juggling them along with the daily flood of new data from its activities in Mars' Gusev Crater.&lt;/span&gt;&lt;/p&gt; &lt;p style='margin-left:.5in'&gt;&lt;span style=''&gt;WORKAROUND: By commanding Spirit each morning into a mode that avoids using the flash memory, engineers plan to begin deleting hundreds of unneeded files to make the memory more manageable for the rover's RAM.&lt;/span&gt;&lt;/p&gt; &lt;p style='margin-left:.5in'&gt;&lt;span style=''&gt;WHY WASN'T THIS CAUGHT IN TEST?: The bug had not been detected in operational tests of the rover on Earth because the longest tests lasted only eight or nine days.&amp;rdquo;&lt;/span&gt;&lt;/p&gt; &lt;p style='margin-left:.5in'&gt;&lt;i&gt;&lt;span style=';font-style:italic'&gt;From &lt;a href="http://www.testgeek.com/"&gt;http://www.testgeek.com&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=70451" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category></item><item><title>how to contact me</title><link>http://blogs.msdn.com/bwill/archive/2003/12/12/42989.aspx</link><pubDate>Fri, 12 Dec 2003 08:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:42989</guid><dc:creator>bwill</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/bwill/comments/42989.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=42989</wfw:commentRss><description>&lt;div class="Section1"&gt; &lt;p&gt;I published this info when I started my &lt;span class="SpellE"&gt;GotDotNet&lt;/span&gt; &lt;span class="SpellE"&gt;blog&lt;/span&gt;; with the move, now is a good time to re-present the info:&lt;/p&gt; &lt;p&gt;Bruce Williams&lt;/p&gt; &lt;p&gt;I am a test developer for Indigo &amp;ndash; current and future Web Services technology at Microsoft.&lt;/p&gt; &lt;p&gt;&lt;span class="GramE"&gt;&lt;span style=''&gt;e-mail&lt;/span&gt;&lt;/span&gt;: &lt;a href="mailto:bwill@microsoft.com"&gt;bwill@microsoft.com&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;IM: &lt;a href="mailto:domanite@hotmail.com"&gt;domanite@hotmail.com&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=42989" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.msdn.com/bwill/archive/tags/COM/default.aspx">COM</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Web+Services/default.aspx">Web Services</category></item><item><title>If you develop on Windows - use AppVerifier!</title><link>http://blogs.msdn.com/bwill/archive/2003/12/10/42601.aspx</link><pubDate>Thu, 11 Dec 2003 03:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:42601</guid><dc:creator>bwill</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/bwill/comments/42601.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=42601</wfw:commentRss><description>&lt;div class="Section1"&gt; &lt;p&gt;&amp;nbsp;I read &lt;a href="http://silverstr.ufies.org/blog/archives/000438.html"&gt;a post recently&lt;/a&gt; from a person who was disappointed that they hadn&amp;rsquo;t heard of the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnappcom/html/AppVerifier.asp"&gt;AppVerifier&lt;/a&gt; tool that Microsoft ships.&amp;nbsp; So let&amp;rsquo;s fix that &amp;ndash; if you do commercial software development on Windows, you owe it to your customers to download &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnappcom/html/AppVerifier.asp"&gt;AppVerifier&lt;/a&gt; and test your product with it.&amp;nbsp; It is an extremely easy way to find bugs that might otherwise be very difficult to track down.&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=42601" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category></item><item><title>Be verwy verwy quiet - we're hunting bugs!</title><link>http://blogs.msdn.com/bwill/archive/2003/09/26/51216.aspx</link><pubDate>Fri, 26 Sep 2003 09:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51216</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51216.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51216</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &lt;a href="http://blogs.gotdotnet.com/ericli/"&gt;Eric Lippert&lt;/a&gt; has &lt;a href="http://blogs.gotdotnet.com/ericli/permalink.aspx/2b34d26e-d46b-436f-9c8d-8a9e68bf469e"&gt;a
            great post&lt;/a&gt; describing some of his adventures with security issues in VBScript.&amp;#160;
            I particularly liked this segment: 
        &lt;/p&gt;
        &lt;p&gt;
            “Of course, it could be worse.&amp;#160; There was a bug in early versions of the CLR
            (which I believe was fixed before the first beta shipped, fortunately) where you could
            get an error message something like 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in"&gt;
            &lt;span&gt;Path discovery security exception: You are not allowed to determine the name
            of directory 'c:\foo\bar'&lt;/span&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            Super! Thanks for letting me know!”&amp;#160; 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51216" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>Fault injection tools from Microsoft</title><link>http://blogs.msdn.com/bwill/archive/2003/09/24/51210.aspx</link><pubDate>Wed, 24 Sep 2003 18:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51210</guid><dc:creator>bwill</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51210.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51210</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            In a response to &lt;a href="http://blogs.gotdotnet.com/bwill/commentview.aspx/2db3e3a7-fa76-401a-964b-9f2639d5848a"&gt;my
            recent post on fault injection&lt;/a&gt;, Mark asks if I know of any publicly-available
            fault-injection frameworks.&amp;#160; Yes!&amp;#160; In fact, much of the fault-injection
            work done at Microsoft is built on top of work done by Microsoft Research, and you
            can also take advantage of their work.&amp;#160; In particular, look at the &lt;a href="http://research.microsoft.com/sn/detours/"&gt;Detours&lt;/a&gt; tool
            for injecting code into an existing binary.&amp;#160; 
        &lt;/p&gt;
        &lt;p&gt;
            Unfortunately, Detours only does native code, not managed code.&amp;#160; We do have managed
            code injection tools internally, but I don’t see them on the research site, so I guess
            they are ‘top secret’.&amp;#160; You are in luck, however; I’ve also heard of a well-known
            fault-injection tool called &lt;a href="http://www.sisecure.com/holodeck/"&gt;Holodeck&lt;/a&gt;,
            that does do managed code.&amp;#160; This also has the advantage of providing a nice user
            interface and support tools – a point-n-click operation.&amp;#160; Detours is a bit more
            low-level, and requires some coding and work on your part.&amp;#160; Unfortunately Holodeck
            does appear to be pretty pricy - $5000 for a single license.&amp;#160; Let’s keep looking… 
        &lt;/p&gt;
        &lt;p&gt;
            A &lt;a href="http://www.google.com/search?hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;q=fault+injection"&gt;google
            search on fault injection&lt;/a&gt; finds a bazillion hits – take a look there and see if
            you can find a tool that meets your needs. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51210" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>For a good time, call 1-800-FAULT-INJECTION-TESTING</title><link>http://blogs.msdn.com/bwill/archive/2003/09/23/51169.aspx</link><pubDate>Tue, 23 Sep 2003 08:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51169</guid><dc:creator>bwill</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51169.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51169</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            We have occasional debates here at Microsoft on the value of ‘white-box’ testing.&amp;#160;
            (For the sake of this discussion, ‘white-box’ testing means testing that takes advantage
            of internal product knowledge, while ‘black-box’ testing relies solely on the published
            API and behavior.) 
        &lt;/p&gt;
        &lt;p&gt;
            On the one hand, if the person who developed code writes the test for it, or if the
            tester was intimately involved in the design of the feature, then the test design
            is often blinded by the dev design.&amp;#160; For example, if the development of the feature
            goes to great lengths to ensure that the threading and locking behavior is correct,
            then the tester may spend a majority of their test effort there.&amp;#160; This is a problem
            if, for example, there are major flaws in the way the feature interacts with its config
            files.&amp;#160; You don’t want a certain focus in product development dictating a similar
            focus in test development. 
        &lt;/p&gt;
        &lt;p&gt;
            On the other hand, there are some kinds of bugs that can *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;only&lt;/span&gt;&lt;/b&gt;*
            be found with white-box testing.&amp;#160; If code has an off-by-one error that only kicks
            in at the exact buffer size that switches between the fast-path algorithm and the
            slow-path algorithm, there is every possibility that even well-designed equivalence
            classes against the published API won’t find the problem.&amp;#160; A quick peek at the
            code, however, can tell you exactly what buffer size to use, if you want to give the
            product a conniption fit. 
        &lt;/p&gt;
        &lt;p&gt;
            However, there is one kind of white-box testing that is pretty much universally seen
            as useful – fault injection testing.&amp;#160; This is where you inject code at compile-
            or run-time to force faults that would not normally occur.&amp;#160; These are great!&amp;#160;
            Once you have a fault-injection test framework set up, a fault scenario that might
            ordinarily require an IBM mainframe database and a female goat can be duplicated in
            a few couple minutes, with a few simple lines of code.&amp;#160; If you are hard-core
            about testing error handling in your program, you owe it to yourself to investigate
            fault-injection schemes.&amp;#160; It is similarly good for increasing code-coverage numbers,
            if you use that metric. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, there are a lot of different ways you can do fault injection.&amp;#160; Recently
            I’ve seen some work done injecting faults at the protocol level during SOAP message
            transmission.&amp;#160; It is interesting to send SOAP messages from one place to another,
            and have a little bitty guy who sits in between and drops, alters, or otherwise interferes
            with the messages flowing by.&amp;#160; (Would that be an example of MaXMLwell’s Demon?)&amp;#160;
            Going further back in the past, I’ve seen a system that systematically generated every
            possible memory allocation fault while running our test suite. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, that last example brings up the ‘dark side’ of fault injection testing.&amp;#160;
            You see, there were a couple problems with that memory allocation testing.&amp;#160; Here
            is how it worked: 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Pick
            a single test variation from your test suite, and run it.&amp;#160; Keep a count of the
            number of memory allocations executed. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Run
            the variation again.&amp;#160; Fail the first memory allocation, and all subsequent ones. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Run
            the variation again.&amp;#160; Fail the second memory allocation, and all subsequent ones. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Keep
            doing this until you’ve gone through the entire set of memory allocations that a successful
            variation run does. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;5.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Go
            to the next test variation. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, the most obvious problem is that this test takes *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;forever&lt;/span&gt;&lt;/b&gt;*
            to run.&amp;#160; It literally took weeks to run through a simple set of COM tests.&amp;#160;
            (Oops, did I accidentally reveal the product in question?)&amp;#160; You really have to
            look at the bugs you find with this method, and ask yourself “is finding these bugs
            worth the cost of the testing?”&amp;#160; There might be other testing you could be doing
            that would find better bugs, or find bugs more efficiently.&amp;#160; So if you are doing
            ‘high-volume’ fault injection, you really need to balance the cost of the testing
            against its value to you. 
        &lt;/p&gt;
        &lt;p&gt;
            Another problem, really more of a nit, is that while this method seems comprehensive,
            there are many cases it doesn’t hit.&amp;#160; What if the memory allocations are only
            failing intermittently?&amp;#160; If something fails only on the pattern “allocation failed,
            allocation succeeded, allocation succeeded again, allocation now fails again”, then
            the test above won’t find it.&amp;#160; I don’t have an answer to this one, except to
            give the sad truth that you can always think of more things to test, than you could
            possibly actually write (or run) tests for. 
        &lt;/p&gt;
        &lt;p&gt;
            Another, much more significant problem, is this: how do you know if it failed?&amp;#160;
            We took the easy way out, and said “if it AV’s, blue-screens, or otherwise crashes
            – it failed.”&amp;#160; So if it appears to succeed; or if it returns a wrong error code;
            or if the behavior of the program is just wrong, in a non-crashing way – we would
            not detect it.&amp;#160; Why did we do this?&amp;#160; Well, remember our discussion of costs
            and tradeoffs.&amp;#160; I’ll give you a million lines of test code, developed over ten
            years by 40 different people.&amp;#160; Are you gonna track through that and fix it so
            it reports errors correctly *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;for every possible
            memory allocation failure path&lt;/span&gt;&lt;/b&gt;*?&amp;#160; Note that I’m not claiming that
            level of detailed testing isn’t useful – it just wasn’t feasible in that case, on
            the scale of the entire test suite.&amp;#160; Picking a set of core functionality and
            writing some exceptionally robust test code specifically for this type of fault injection
            scenario might be a useful endeavor.&amp;#160; We’ll see.&amp;#160; &amp;lt;grin&amp;gt; 
        &lt;/p&gt;
        &lt;p&gt;
            For those concerned about Microsoft code quality, note that these days we do also
            have some static analysis tools that will churn through a reasonable subset of possible
            call graphs in our programs, and report possible problems in error paths.&amp;#160; It
            even files bugs automatically – the Windows folks love that, I’m sure! 
        &lt;/p&gt;
        &lt;p&gt;
            Some of my readers may be familiar with Microsoft’s stress-testing efforts, where
            we often hammer a machine with tests to the point of program failure.&amp;#160; While
            stress testing is useful, don’t be fooled into thinking that it is an adequate replacement
            for fault-injection testing.&amp;#160; The biggest problem with stress testing is the
            “early exit” problem.&amp;#160; If you are crushing a machine to the point that memory
            allocations are failing, then most programs are just going to die immediately when
            you run them.&amp;#160; You are only going to end up testing the first 10% of the program,
            which presumably is not&amp;#160; the intent.&amp;#160; Another issue is that stress test
            failures tend to be non-deterministic; you don’t necessarily know when (or if) a particular
            failure will occur, and it can be very difficult to determine the actions that led
            up to the failure.&amp;#160; This makes debugging a stress failure much more, well, stressful;
            than debugging an equivalent failure in a fault injection test. 
        &lt;/p&gt;
        &lt;p&gt;
            Lastly, note that (as with so many of the topics I write about), there is much, much,
            more to it than I have written.&amp;#160; For example, there are many different kinds
            of faults that you can inject.&amp;#160; We talked about memory faults and protocol faults;
            but there are also file access faults, security faults (a biggie!), system object
            access faults (events, mutexes, etc), registry faults – you can even feel free to
            inject faults into your own internal product code – what happens when your lower-level
            stuff throws an exception to the higher-level stuff? 
        &lt;/p&gt;
        &lt;p&gt;
            It is really not that hard to get started with, however; and I highly recommend it. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51169" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>Test tracing - it is not optional!</title><link>http://blogs.msdn.com/bwill/archive/2003/09/20/51165.aspx</link><pubDate>Sun, 21 Sep 2003 02:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51165</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51165.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51165</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            I’d like to talk about one of the first lessons I learned as a tester at Microsoft: 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Anticipate failure investigations, and log everything.&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            Let me tell you a fairly rambling tale of my early days at Microsoft: 
        &lt;/p&gt;
        &lt;p&gt;
            We’d just shipped Windows NT 4.0 (and IIS 1.0).&amp;#160; I’d recently moved from a contract
            position in the Windows build lab; to a full-time position (aka FTE, aka ‘blue-badge’)
            in the COM test team. 
        &lt;/p&gt;
        &lt;p&gt;
            In those days, the COM team was just beginning its transition from a consumer, drag-n-drop,
            linking-and-embedding technology; to a distributed computing, enterprise-application
            sort of focus.&amp;#160; This was all before COM+; DCOM was the new thing.&amp;#160; Given
            that history, it is perhaps not surprising that we had a bunch of old tests covering
            a variety of those aforementioned consumer-oriented applications of COM.&amp;#160; Linking
            and embedding, COM common dialogs, and more; these were tests that had been lovingly
            handed down from tester to tester over the years. 
        &lt;/p&gt;
        &lt;p&gt;
            You’ll recall I mentioned a transition.&amp;#160; Now, those who have been in the industry
            for a while know what it means when the product changes focus like that.&amp;#160; Resources
            shift.&amp;#160; Things happen, like taking these “upper layer” tests from the five experienced
            testers who owned them, and giving them to a new, green tester fresh from the build
            lab.&amp;#160; Sink or swim, as they say.&amp;#160; Let me tell you, taking over maintenance
            of a large test suite (written by a number of different people, in a number of different
            styles &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;*ping*&lt;/span&gt;&lt;/b&gt;) is a great way to learn
            some valuable lessons about test code design. 
        &lt;/p&gt;
        &lt;p&gt;
            For example, there was a test for the OLE common dialogs, used for inserting OLE objects
            and other operations.&amp;#160; This test basically ran a large script (&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;*ping*&lt;/span&gt;&lt;/b&gt;)
            that iterated through a bunch of scenarios exercising these dialogs.&amp;#160; In total
            the scripts performed thousands of operations – click that button, move that window,
            select this other menu option, etc.&amp;#160; Now, any time you have one program executing
            a script like that, you basically have one program running another program.&amp;#160;
            This means it is particularly difficult to figure out, from a debugger, what the dang
            thing is doing.&amp;#160; When you break in, the stack just shows you what the script
            interpreter is doing, and it requires some investigation of the program variables
            to figure out where you are in the script being interpreted. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, the test had a log file output, but unfortunately when I acquired the test this
            output was fairly minimal.&amp;#160; Let me tell you, debugging a failure in this test
            was an adventure!&amp;#160; It was time-consuming, and technically challenging.&amp;#160;
            (Technically educational, too, I will say.)&amp;#160; So I went into the interpreter and
            did something very simple – I just logged each unique operation as it executed: 
        &lt;/p&gt;
        &lt;p&gt;
            LOG TRACE: Menu Select ‘File Open’ 
        &lt;/p&gt;
        &lt;p&gt;
            The logs got a lot bigger, and the test ran marginally more slowly (those UI tests
            tended to be dog slow, anyway), but now when something failed, I could look at the
            log and see the precise script actions that led up to the failure. 
        &lt;/p&gt;
        &lt;p&gt;
            So what I learned is that it is really, really important in a test to log *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;everything&lt;/span&gt;&lt;/b&gt;*.&amp;#160;
            Log your inputs; log your outputs; log all the program variables that seem even halfway
            interesting.&amp;#160; It will make your life so much easier.&amp;#160; It will make the life
            of the next test maintainer so much better.&amp;#160; If it causes a severe performance
            hit, *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;then&lt;/span&gt;&lt;/b&gt;* you can perhaps think about
            placing some of the trace output under a switch, that you can enable or disable as
            needed for debugging purposes.&amp;#160; Even there, make sure you can turn on the trace
            output without having to recompile the program – you’ll thank yourself later. 
        &lt;/p&gt;
        &lt;p&gt;
            On a side note, in the last couple years I’ve noticed a trend in Microsoft product
            design to add this kind of detailed tracing to our products.&amp;#160; Debug level tracing,
            in the production code – something you can enable or disable with a program or registry
            entry.&amp;#160; I know that DTC has done this for a while, and I believe it has been
            standard practice in the mainframe world for decades.&amp;#160; Of course, for performance
            reasons the tracing is typically turned off in normal execution – but it is there,
            and it doesn’t require a re-compile to enable. 
        &lt;/p&gt;
        &lt;p&gt;
            PSS loves this – it really helps them track down and solve customer problems. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51165" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>more Scoble stuff - there are many parts, but only one Microsoft</title><link>http://blogs.msdn.com/bwill/archive/2003/09/20/51158.aspx</link><pubDate>Sat, 20 Sep 2003 23:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51158</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51158.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51158</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            Again, while reading &lt;a href="http://radio.weblogs.com/0001011/2003/09/20.html#a4701"&gt;this
            same Scoble post&lt;/a&gt;, it got me thinking about my role at Microsoft.&amp;#160; When I
            tell people what I do at Microsoft, I say "I do software testing.&amp;#160; If you find
            a bug in a Microsoft product, it is my fault." 
        &lt;/p&gt;
        &lt;p&gt;
            Of course, that is a vast oversimplification.&amp;#160; I work on one part of one product,
            that isn't even released yet.&amp;#160; I could easily disclaim responsibility for the
            particular problems people are having.&amp;#160; But that’s not the kind of person I want
            to be.&amp;#160; That’s not the kind of company I want to be part of.&amp;#160; And if I don’t
            take the responsibility, who will? 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51158" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>“The first priority, young man, is to find the bugs…”</title><link>http://blogs.msdn.com/bwill/archive/2003/09/10/51132.aspx</link><pubDate>Wed, 10 Sep 2003 18:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51132</guid><dc:creator>bwill</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51132.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51132</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &amp;#160;&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Prologue&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            One of my teammates recently set up a &lt;a href="http://wiki.org/"&gt;Wiki&lt;/a&gt; site for
            my team, and I must admit that I have become quite addicted to it.&amp;#160; One of the
            pages I’ve created has been a list of common test areas, a checklist of things most
            of our tests will want to concern themselves with.&amp;#160; Things like “bad parameters”,
            and “different transport protocols”. 
        &lt;/p&gt;
        &lt;p&gt;
            Let me interject at this point that this concept of a common test checklist is by
            no means a new one.&amp;#160; Anyone among my three readers who has done software testing
            before knows what I mean.&amp;#160; Despite &lt;a href="http://www.google.com/search?hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;q=software+test+checklist"&gt;all
            the prior art&lt;/a&gt;, however, I believe it is useful to have a team-specific list; something
            that targets those test areas particularly relevant to that team.&amp;#160; To pick a
            team completely at random, for example, .NET Remoting likely has specific test areas
            and checklist items that are particularly relevant to it. 
        &lt;/p&gt;
        &lt;p&gt;
            My checklist currently has about 20-30 items on it; today I would like to focus on
            a single one of them; two simple words: &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Multithreaded
            Testing&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            In reality, it’s a topic that can fill a library.&amp;#160; I’m going to chat about my
            empirical experiences in this area, but if you are interested, there is also considerable &lt;a href="http://research.microsoft.com/spt/"&gt;computer
            science research in this area&lt;/a&gt;. 
        &lt;/p&gt;
        &lt;p&gt;
            As I write this, I find myself mentioning test topics that deserve more discussion,
            in a future post.&amp;#160; I’ll mark those with a *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Ping&lt;/span&gt;&lt;/b&gt;*
            so I remember to go back to them some other day. 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;“The first priority, young man, is to find the
            bugs…”&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            Many moons ago, in the before-time, I wrote a test suite for the IErrorInfo interface
            and the associated COM infrastructure.&amp;#160; (Yes, it is my fault if it doesn’t work
            right…)&amp;#160; One set of tests that I wrote was designed to discover race condition
            problems when multiple objects on different threads got error objects back from the
            same target object. 
        &lt;/p&gt;
        &lt;p&gt;
            I was actually quite proud of these tests.&amp;#160; In one case, I would have threads
            A and B call object O, where the calls arrived in the order A, then B, but by judiciously
            blocking the calls in the target object, they would return in the order B, then A.&amp;#160;
            In another case, I would force the order as A-calls, B-calls, A-returns, B-returns. 
        &lt;/p&gt;
        &lt;p&gt;
            I had about four of these test variations.&amp;#160; I had beautiful charts in my test
            specification describing the control flow.&amp;#160; I had bountiful program output, describing
            the scenario in loving detail for anyone who might happen to need to debug a failure.&amp;#160;
            I loved those, because if anything failed, I could point to the exact repro scenario
            and documentation needed to demonstrate and debug the bug.&amp;#160; *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Ping&lt;/span&gt;&lt;/b&gt;* 
        &lt;/p&gt;
        &lt;p&gt;
            What I forgot (or hadn’t learned yet), was that documentation and easy repros, while
            important, are all “priority two”.&amp;#160; The first priority is to *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;find
            the bugs&lt;/span&gt;&lt;/b&gt;*. 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Hindsight is 20/20&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            You see, by artificially controlling the ordering of the thread actions, I’m also
            artificially constraining the product code paths that my test explores.&amp;#160; For
            example, my test would never try the case where a call arrives at the target object
            at the exact same time as another call returned from that object; the care I took
            in synchronizing the scenario prohibited it. 
        &lt;/p&gt;
        &lt;p&gt;
            What I should have done was kick off about a hundred threads, set up some loops so
            they continuously hit the target object, and let it run for a minute or two.&amp;#160;
            Sure, random testing is not deterministic; there is no guarantee that a given failure
            will repro, and figuring out what happened when something does fail is a major pain
            in the rear.&amp;#160; But remember, that is all “priority two”.&amp;#160; Think about all
            those calls, twisting and twining, overlapping and conflicting, throughout the internal
            IErrorInfo infrastructure.&amp;#160; Its gonna be *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;tons&lt;/span&gt;&lt;/b&gt;*
            better at finding bugs than the four simple variations I wrote years ago. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, even that random test case isn’t enough.&amp;#160; There may be races that will just
            never show up on your machine, in your configuration.&amp;#160; To catch stuff like that,
            you’ll want to induce errors or delays; the joys of fault injection.&amp;#160; *&lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Ping&lt;/span&gt;&lt;/b&gt;* 
        &lt;/p&gt;
        &lt;p&gt;
            You also might want to run tests for longer than a minute or two, which brings us
            to our next topic… 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;b&gt;&lt;span style="FONT-WEIGHT: bold"&gt;How I learned to stop worrying and love the stress&lt;/span&gt;&lt;/b&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            Sometimes, a race only shows up once every couple months.&amp;#160; Sometimes it will
            only show up on a single machine; the one that has the magic combination of system
            components that demonstrate the failure.&amp;#160; To catch these, the Windows team has
            this thing called “Office Stress”.&amp;#160; This runs a bunch of different tests, exercising
            many of the features of Windows.&amp;#160; It crushes the machine – office stress will
            routinely peg the CPU, and things run so slowly that failures are the norm. 
        &lt;/p&gt;
        &lt;p&gt;
            Now, honestly, that is mostly useful for testing software that cannot fail.&amp;#160;
            Things like winlogon, or rpcss; if they fail, the machine fails.&amp;#160; These core
            system components have to keep functioning even if 90% of their memory allocations
            start failing – and office stress will force that condition. 
        &lt;/p&gt;
        &lt;p&gt;
            Office stress is not so useful for testing other kinds of programs.&amp;#160; Your typical
            application doesn’t expect to keep working with memory failures – it just dies, hopefully
            with some appropriate error message.&amp;#160; Typically when you run these programs under
            office stress, they’ll die in the first 10% of the program, so you end up never testing
            the other 90% of the program.&amp;#160; For these programs, a lower-intensity variant
            of stress is appropriate.&amp;#160; We’ll tune the test configuration so that it runs
            at about 70% resource utilization, and just let it run continuously.&amp;#160; The ASP.NET
            team does a lot of their stress testing like this; in addition to finding race conditions
            and other multithreading issues, it is also good for finding slow resource leaks. 
        &lt;/p&gt;
        &lt;p&gt;
            On a side note, we also have a concept of “long-haul” stress.&amp;#160; Teams at Microsoft
            often have ship criteria where we won’t ship a product unless it has run on so-many-hundreds
            of machines, for a certain number of days, under stress, without failures.&amp;#160; For
            Windows, for example, I believe it is something like forty days.&amp;#160; (Once we start
            the last one of these forty-day test passes, it is a major pain in the rear if someone
            finds a showstopper bug that resets testing…)&amp;#160; Depending on the team, long-haul
            stress may consist mainly of high-intensity or low-intensity stress testing. 
        &lt;/p&gt;
        &lt;p&gt;
            In the managed world, we do an interesting variation on fault-injection combined with
            stress.&amp;#160; We have this tool called GCStress, which basically forces the garbage
            collector to do a collection on every program step.&amp;#160; Yeah, its really slow.&amp;#160;
            By running this along with our tests, we can surface memory failures pretty much at
            the point where they occur, which makes them much easier to debug.&amp;#160; (Similar
            to using the appverifier and turning on full pageheap, in the unmanaged world.) 
        &lt;/p&gt;
        &lt;p&gt;
            Anyway, I’m definitely rambling away from the original topic of this entry, so I’ll
            sign off now.&amp;#160; I’ve enjoyed writing this up; it helps me clarify the concepts
            in my mind.&amp;#160; Please do let me know if you find it interesting as well! 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51132" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>Escape Analysis; or, 'how *did* that bug slip through testing?'</title><link>http://blogs.msdn.com/bwill/archive/2003/09/09/51125.aspx</link><pubDate>Wed, 10 Sep 2003 03:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51125</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51125.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51125</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &amp;#160;After the Indigo team's last milestone (M4), most of our feature test teams
            did an analysis of the bugs in their feature area, and extracted some useful 'lessons
            learned' to help us improve our testing in future milestones.&amp;#160; Here are some
            of the lessons we learned: 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Do
            breadth-first testing, sanity testing, and test prototyping as early as possible.&amp;#160;
            A higher-than-expected number of our bugs were found by developers and casual users
            of the release; bugs that we expected test to find, and ones that they later did find.&amp;#160;
            We could have saved those folks some wasted time if we had a basic level of testing
            available in all feature areas as early as possible in the milestone. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Be
            very thorough in design and spec reviews; it pays off.&amp;#160; Explore the alleyways
            of the design, and ask obscure questions about threading and error handling.&amp;#160;
            You'll save yourself a lot of grief by working these issues out in design, rather
            than discovering them through exhaustive investigation during later testing. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Be
            very clear about how testing of cross-team dependencies will be done.&amp;#160; Documentation,
            communication, and review across feature teams is important.&amp;#160; If you ever find
            yourself saying "we don't need to test that, team XYZ is doing it", stop yourself,
            and go double-check that team XYZ agrees with your conclusion. 
        &lt;/p&gt;
        &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;![if !supportLists]&gt;
            &lt;span style="mso-list: Ignore"&gt;4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt; Participate
            in dev code reviews and set aside some time for white-box testing.&amp;#160; My team tends
            to go back-and-forth on the value of white-box testing.&amp;#160; In our M4 milestone,
            however, did identify a number of bugs that could have been caught if we (test) had
            a better concept of the internal product design.&amp;#160; There were also several bugs
            that would have been extremely difficult to find without using some kind of white-box
            testing technique like fault injection. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51125" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>I work on "Indigo"</title><link>http://blogs.msdn.com/bwill/archive/2003/09/08/51115.aspx</link><pubDate>Mon, 08 Sep 2003 19:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51115</guid><dc:creator>bwill</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51115.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51115</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            I noticed at &lt;a href="http://weblogs.asp.net/CSchittko/posts/25404.aspx"&gt;this link&lt;/a&gt; that
            folks are starting to hear (and speculate) about Indigo.&amp;#160; That’s cool to see,
            because that’s my team!&amp;#160; I know, I shouldn’t tease, because I’m not allowed to
            talk about it yet – but still, it is just cool to start getting some public recognition.&amp;#160;
            Even if it is just guesses about what we are about.&amp;#160; Insert obligatory &lt;a href="http://msdn.microsoft.com/events/pdc/"&gt;PDC
            reference&lt;/a&gt; here. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51115" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>ASML - a modeling tool for testing</title><link>http://blogs.msdn.com/bwill/archive/2003/09/02/51099.aspx</link><pubDate>Wed, 03 Sep 2003 06:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51099</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51099.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51099</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &amp;#160;John Tobler &lt;a href="http://weblogs.asp.net/jtobler/posts/24755.aspx"&gt;talks
            a bit about Abstract State Machine Language (ASML)&lt;/a&gt; on his blog.&amp;#160; This is
            actually a really cool technology – one my test team has been looking at for a little
            while now, and one that I personally have been struggling to wrap my mind around.&amp;#160;
            At first I thought it was a test-case generator; we have other state-based tools here
            at Microsoft that do that kind of work, so that is where my mind goes when I think
            about “state machine” tools.&amp;#160; However, I’ve come to realize that its true role
            (ok, one of its true roles) is as an oracle.&amp;#160; 
        &lt;/p&gt;
        &lt;p&gt;
            Suppose you write a test, and want to check if the result is correct.&amp;#160; How do
            you know?&amp;#160; If you hand-wrote the test, then you probably “know” the expected
            result.&amp;#160; But if you automatically generate thousands of test cases, it gets harder.&amp;#160;
            What you really want is a second, completely independent version of the program, whose
            results you can compare to the real program.&amp;#160; This second source of expected
            test results is what testers call an ‘oracle’.&amp;#160; ASML is a computer language (a
            .NET language, even) that lets you write that oracle really fast.&amp;#160; The oracle
            will encapsulate the broad strokes of the real thing, while likely glossing over a
            few of the details – but its close enough to serve as a good point of comparison against
            the production code.&amp;#160; Thus your ASML program is a ‘model’ of the real thing. 
        &lt;/p&gt;
        &lt;p&gt;
            It’s a really cool concept, especially since the more I do this testing thing, the
            more I realize that automation is the only way to fly.&amp;#160; Being clever about the
            automation and about choosing what to test is the future of software testing. 
        &lt;/p&gt;
        &lt;p&gt;
            Another role of ASML is as a spec validator; the process of implementing your spec
            in ASML can show spec flaws a lot faster than doing so in a production development
            effort. 
        &lt;/p&gt;
        &lt;p&gt;
            Another super-cool thing about ASML is that it is a full-fledged .NET language, so
            it has access to the whole .NET Framework.&amp;#160; It’s a real programming language,
            and you can write real programs with it.&amp;#160; I have a colleague who has an exercise
            he does to learn a new programming language; he writes ‘Tetris’ in that language.&amp;#160;
            I’ve seen a functional version of Tetris written in ASML. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51099" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/bwill/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>Closing the cycle between test and customers</title><link>http://blogs.msdn.com/bwill/archive/2003/08/13/51047.aspx</link><pubDate>Wed, 13 Aug 2003 19:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51047</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51047.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51047</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &amp;#160;I was thinking about the role of test this morning.&amp;#160; We measure the quality
            of the product - but in some sense we have to take an educated guess what "quality"
            means.&amp;#160; In the end, the customer determines if it is a quality product, and they
            can't make that decision until we ship the product.&amp;#160; (Well, we do have betas
            and previews to help out.)&amp;#160; Waiting for summary quality rollups from PSS after
            shipping seems like a pretty slow and cumbersome way to have a "quality connection"
            between test and the customer. 
        &lt;/p&gt;
        &lt;p&gt;
            So what can we do to tighten the customer-test cycle of information?&amp;#160; Clearly
            looking at beta feedback is critical, but is there anything more "automatic" that
            we could do? 
        &lt;/p&gt;
        &lt;p&gt;
            How about if we had a sampling profiler that ran automatically when people run the
            beta?&amp;#160; Sampling profilers are low-impact, and spread over all beta testers, we'd
            get solid coverage numbers.&amp;#160; Upload and integrate the data, and compare it to
            our test code coverage data.&amp;#160; Bang!&amp;#160; We have an automated method to compare
            how we test the product against how customers actually use it.&amp;#160; Heck, if we have
            internal customers using our stuff, I'd love to get their data too! 
        &lt;/p&gt;
        &lt;p&gt;
            I wonder what the next step would be?&amp;#160; Maybe learn more about sampling profilers...&amp;#160;
            I'll see if I can find some time for that... 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51047" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category></item><item><title>An example of Test-Driven Development</title><link>http://blogs.msdn.com/bwill/archive/2003/08/13/51045.aspx</link><pubDate>Wed, 13 Aug 2003 19:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51045</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51045.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51045</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            A fairly long description of a project using TDD can be found at: 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="http://redsquirrel.com/dave/work/babySteps/#200306"&gt;http://redsquirrel.com/dave/work/babySteps/#200306&lt;/a&gt; 
        &lt;/p&gt;
        &lt;p&gt;
            I've skimmed it, and look forward to perusing it in more depth when I have time. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51045" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category></item><item><title>If a metric falls in the forest, did it make a sound?</title><link>http://blogs.msdn.com/bwill/archive/2003/08/13/51040.aspx</link><pubDate>Wed, 13 Aug 2003 19:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51040</guid><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bwill/comments/51040.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwill/commentrss.aspx?PostID=51040</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;div class="Section1"&gt;
        &lt;p&gt;
            &amp;#160;I heard a comment today that really struck home with me: 
        &lt;/p&gt;
        &lt;p&gt;
            "If you aren't willing to act on a metric, you might as well not measure it." 
        &lt;/p&gt;
        &lt;p&gt;
            This makes sense to me, and also strikes a nerve.&amp;#160; I know I've seen any number
            of metrics over the years - bug charts, task progress charts, anything and everything
            that can be measured.&amp;#160; I admit I've been guilty at times of looking at some numbers
            and saying "that looks bad!" and waiting for a response, and happy that we had this
            great information available. 
        &lt;/p&gt;
        &lt;p&gt;
            But having the information is only half the story. 
        &lt;/p&gt;
        &lt;p&gt;
            If a metric is off, if it indicates something is late or not getting done, the right
            comment is "this measurement isn't what we expect or need - and here is what we can
            do about it."&amp;#160; Cut a feature, extend the milestone, shuffle some people around
            - if you aren't willing to define and accept the remediation actions, you might as
            well not even look at the measurement. 
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=51040" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwill/archive/tags/Software+Testing/default.aspx">Software Testing</category></item></channel></rss>