<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Darryl Russi's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/darrylru/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/darrylru/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 04:58:02 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Debugging Tip: Viewing Address of Managed Code</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/debugging-tip-viewing-address-of-managed-code</link>
      <pubDate>Tue, 07 Feb 2012 23:39:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2012/02/07/debugging-tip-viewing-address-of-managed-code/</guid>
      <description><![CDATA[Ever need to write managed code that then talked to unmanaged code elsewhere?&nbsp; Sometimes when...]]></description>
      <content:encoded><![CDATA[<p>Ever need to write managed code that then talked to unmanaged code elsewhere?&nbsp; Sometimes when debugging about why things are not working the way you expect it is useful to just inspect the values on both systems to understand the differences. One of the difference with managed code is that you rarely need to access the actual memory address, but there are times it is useful.&nbsp; In Visual Studio this can be done simply by using the immediate window.</p>
<p>For instance if I wanted to know the address of a byte[] from the following code.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/7028.image_6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/7028.image_5F00_6.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/7041.image_thumb_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/7041.image_5F00_thumb_5F00_2.png" width="244" height="32" /></a></p>
<p>You can dereference the item to get the memory address by opening the Immediate Window &amp; entering the following:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/4807.image_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/4807.image_5F00_2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/4810.image_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/4810.image_5F00_thumb.png" width="223" height="91" /></a></p>
<p>Now you can drop the address of the memory into the memory window to see how it is laid out.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/5481.image_4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/5481.image_5F00_4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/29/57/metablogapi/7127.image_thumb_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-57-metablogapi/7127.image_5F00_thumb_5F00_1.png" width="218" height="87" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test–Ensuring Testability/Influencing Design</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-testensuring-testabilityinfluencing-design</link>
      <pubDate>Tue, 30 Aug 2011 12:14:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/08/30/challenges-in-testensuring-testabilityinfluencing-design/</guid>
      <description><![CDATA[Products are primarily designed for customers, yet a test team must test these products.&nbsp; Who...]]></description>
      <content:encoded><![CDATA[<p>Products are primarily designed for customers, yet a test team must test these products.&nbsp; Who is thinking about how you might test the product? If you are a tester, you better be thinking about it and providing feedback to your developers about their design. Your feedback should both be for the customer and how to better enable you to test the product effectively.</p>
<p>For some of technologies there may be tools you can use such as the <a href="https://msdn.microsoft.com/en-us/library/dd318466(v=VS.85).aspx">IAccessible</a> interface for many windows forms or the tools that we ship as part of Visual Studio Test.&nbsp; Yet you may be on a product for which there are no other people testing that technology &amp; therefore less existing items you can leverage. A tester needs to know what technologies are out there &amp; be willing to dig in and implement similar technologies if they do not exist for their environment.</p>
<p>For example how can you do UI automation on an Xbox console?&nbsp; The console does not have public interfaces for manipulating UI elements &amp; is completely different than a traditional WinForm.&nbsp; Additionally, it uses a different processor architecture (<a href="https://en.wikipedia.org/wiki/PowerPC">PowerPC</a>) than what many Microsoft products use (<a href="https://en.wikipedia.org/wiki/X86">x86</a>, x64, &amp; more recently <a href="https://en.wikipedia.org/wiki/ARM_processor">ARM</a>), so some tools &amp; libraries won&rsquo;t work on it.&nbsp; What does it&rsquo;s UI need to support for you to be able to have reliable automation?&nbsp; What would you ask the developer to do for you to get better automation? Below are a couple items that you could use when designing your product to improve testability. As always with test, there is no one magic bullet but instead they are tools that we can leverage where it makes sense for our development.</p>
<h2>Model View Controller (MVC)</h2>
<p>Design plays a large role in how you can test a product. It influences how devs write their code &amp; how you can then write your test code. There are many concepts out there to help improve the testability of a product design. One example is <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">Model View Controller</a> (MVC).&nbsp; The idea with this design pattern is that you minimize the logic that is in your UI (aka View) and push your business logic into the model.&nbsp; The controller then manages the interaction between the two.&nbsp; With most of your business logic pushed into the model, this means you can now manipulate the model directly possibly via APIs and do a large amount of testing that way instead of relying on the UI. Traditionally API testing is much more reliable &amp; robust than UI testing as UI changes more often and has timing issues with regards to knowing when you click on something when the next screen of the UI is ready for input.&nbsp; This design also has the added benefit of allowing the developers to quickly add additional views with out much effort.</p>
<p>A newer pattern which is similar and targeted at several of the latest Microsoft UI development platforms (Windows Presentation Foundation &amp; Silverlight) is <a href="https://en.wikipedia.org/wiki/MVVM">Model View ViewModel</a> (MVVM).&nbsp; This adds a ViewModel which is an abstraction of the view used in data binding of the model to the view.</p>
<h2>Mock Objects</h2>
<p>How are you going to test error conditions in your code?&nbsp; What if components you require are still under development? Are you testing a UI component which requires a service? Mock objects are a useful way to tackle these types of problems.&nbsp; If you design your code to allow for the ability to use <a href="https://en.wikipedia.org/wiki/Mock_object">mock objects</a>, you can simulate them.&nbsp; In order to do this your product needs to be written clean enough that you can swap mock objects &amp; the real objects.&nbsp;</p>
<p>Take for example a product that relies on a SQL database. You likely have a data layer that handles your calls out to SQL.&nbsp; When implementing this data layer, you can implement a mock object to simulate the SQL server.&nbsp; This would allow you to do things such as simulate the results of the database or if the network is down. Mock objects are also useful at the unit testing level as the developer can isolate their component to only rely on these mock objects.&nbsp; This is especially useful if they depend on another component also under</p>
<div style="margin: 0px; display: inline; float: none; padding: 0px;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dfa97c76-d63f-4173-ab70-b03579caccdf" class="wlWriterEditableSmartContent">Technorati Tags: <a href="https://technorati.com/tags/SDET" rel="tag">SDET</a>,<a href="https://technorati.com/tags/Test" rel="tag">Test</a></div>
<p>development which may not be ready for consumption yet.&nbsp; If you are following <a href="https://en.wikipedia.org/wiki/Test-driven_development">test-driven development</a> (TDD) then it is also useful for being able to write tests prior to implementing the product code.</p>
<h2>Conclusion</h2>
<p>Similar to developers, testers need to stay abreast with the various design patterns that can be used in development. As products continue to grow in complexity gone are the days of a tester being able to strictly <a href="https://en.wikipedia.org/wiki/White-box_testing">white box test</a> and <a href="https://en.wikipedia.org/wiki/Blackbox_testing">black box test</a> an application after development is code complete. Doing so will likely result in a product that is highly difficult to test and result in automation that is less robust and reliable. Instead we expect and involve our testers from the earliest stages of design both as a sounding board for designing a solution to a problem and as a source of input to ensure the product we develop is highly testable.</p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test – Impeccable Infrastructure</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-test-impeccable-infrastructure</link>
      <pubDate>Mon, 22 Aug 2011 02:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/08/22/challenges-in-test-impeccable-infrastructure/</guid>
      <description><![CDATA[In order to test a product there is always a fair amount of infrastructure needed to keep the wheels...]]></description>
      <content:encoded><![CDATA[<p>In order to test a product there is always a fair amount of infrastructure needed to keep the wheels running.&#160; Just a few examples of the types of infrastructure that test requires are:</p>  <ul>   <li>Test harness</li>    <li>Logger</li>    <li>Common code for building test automation </li>    <li>Reporting websites </li>    <li>Databases for storing various results </li>    <li>Machines for running tests in the lab </li>    <li>Topology for your product to simulate customer deployments </li>    <li>Tools for managing your infrastructure </li>    <li>Tools for testing &amp; possibly for customers </li>    <li>Etc.</li> </ul>  <p>As you might imagine this can become quite an undertaking and in larger teams this is sometimes delegated to a dedicated lab team to support.</p>  <p>On top of all this work is the set of tests that your team is running &amp; many times it also supports your development team for their development needs.&#160; A high quality infrastructure is something that can sometimes be taken for granted, until there is a problem which can at best slow down your team’s efficiency or at worse invalidate your testing due to some bad assumptions.</p>  <p>Bugs are an equal opportunity employer so similar to the previous post how you need to prove your product is correct, that extends to your test infrastructure. When you find a bug are you ready &amp; able to prove that it resides in the product code &amp; is not a problem with your test infrastructure?&#160; Here are a couple real world examples of both to further demonstrate the need to focus on how you are building your test infrastructure.</p>  <h2>Will this thing ever finish?</h2>  <p>Working on a sync engine for Microsoft Identity Integration Server (MIIS) we were investigating the ability of the product to scale.&#160; As such a tester had instrumented some counters to track the rate that sync occurred as it ran through a couple million objects.&#160; This process was taking a couple days, which was expected due to the scale being tested.&#160; The tester was then leveraging the data about their rate of sync to determine the performance of the synchronization engine and then extrapolate out an ETA for the test to complete.&#160; As he plotted this out each day the rate would drop and he would give an updated ETA.&#160; Below is a hypothetical table for the data that was being collected.</p> <center>   <table style="border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="388"><colgroup><col style="width: 48pt" width="64" /><col style="width: 91pt; mso-width-source: userset; mso-width-alt: 4425" width="121" /><col style="width: 48pt" width="64" /><col style="width: 104pt; mso-width-source: userset; mso-width-alt: 5046" width="138" /></colgroup><tbody>       <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; background: #4f81bd; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none" height="20" width="64"><font face="Calibri"><font style="font-size: 11pt" color="#ffffff"><strong>Day</strong></font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #4f81bd; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none" width="121"><font face="Calibri"><font style="font-size: 11pt" color="#ffffff"><strong>Rate                  <br />(Objs/day)</strong></font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #4f81bd; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none" width="64"><font face="Calibri"><font style="font-size: 11pt" color="#ffffff"><strong>Objects Remaining</strong></font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #4f81bd; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none" width="138"><font face="Calibri"><font style="font-size: 11pt" color="#ffffff"><strong>Est. Days remaining</strong></font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">1</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">50,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">2,000,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">40.0</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">2</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">50,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,950,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">39.0</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">3</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">49,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,900,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">38.8</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">4</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">48,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,851,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">38.6</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">5</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">45,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,803,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">40.1</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">6</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">42,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,758,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">41.9</font></font></td>       </tr>        <tr style="height: 15pt" height="20">         <td style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" height="20" align="right"><font face="Calibri"><font style="font-size: 11pt">7</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">40,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: medium none; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl65" align="right"><font face="Calibri"><font style="font-size: 11pt">1,716,000</font></font></td>          <td style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-left: 1px; padding-right: 1px; font-family: ; background: #dce6f1; color: ; vertical-align: bottom; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; text-decoration: ; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none" class="xl66" align="right"><font face="Calibri"><font style="font-size: 11pt">42.9</font></font></td>       </tr>     </tbody></table> </center><strong>Note</strong>: This data is completely made up just for illustration as it was years ago &amp; I don’t have the actual data.   <p>After several days of work, we realized that every day the rate moved enough that it would never complete. Sound the alarms, we have a bug!</p>  <p>Now you spin up your developer &amp; proudly point to a newly found bug.&#160; After some investigation through it is found out low &amp; behold yes there is a bug, but it is the test infrastructure causing it.&#160; What is that you say?&#160; How can my test cause a product bug? In this case it turned out to be that the way the tester implemented the counters for monitor the product were doing an expensive query via WMI on a VERY aggressive basis. This query was tying up system resources &amp; therefore causing the slow down in the product.</p>  <p>Lesson learned is to be aware of the <a href="https://en.wikipedia.org/wiki/Observer_effect_(information_technology)">observer effect</a> and try to ensure your test code is as unobtrusive as possible when measuring items like performance.</p>  <h2>Test A says pass, but Test B says fail?</h2>  <p>In another example of working on performance on <a href="https://www.microsoft.com/fim">Forefront Identity Manager</a> (FIM) we were in the midst of a major improvement to performance.&#160; We had some very talented developers on the project &amp; as a great developer they had written some excellent unit tests to help test their progress closer to the API level.&#160; Similarly we had some tests which covered end to end UI scenarios for performance. The developers reported great progress in improving our performance and so we kicked off our tests to see how we were looking end to end.&#160; It so happened that our management was meeting to discuss our project progress with their managers, so they were eager for an update for performance. We kick off the UI performance tests &amp; find that everything is timing out!</p>  <p>We have two very different results, so which should we tell our managers to report? We have to figure out which test is correct and why is there a difference. Well a good start is to minimize the variables, so we took the tests out of the picture by doing some manual testing.&#160; Sure enough our manual results were inline with what the UI tests were showing,    <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4efbe8d0-cd19-446d-9e37-45d4acab6963" class="wlWriterEditableSmartContent">Technorati Tags: <a href="https://technorati.com/tags/SDET" rel="tag">SDET</a>,<a href="https://technorati.com/tags/Test" rel="tag">Test</a></div> but why are the tests showing different results?&#160; We then started profiling the SQL server using both the unit tests &amp; the UI test. Sure enough the queries reported the differences we saw in the amount of time taken.&#160; This goes back to <a href="https://blogs.msdn.com/b/darrylru/archive/2011/03/07/challenges-in-test-knowing-your-product.aspx">knowing your product</a>, as based on our knowledge of the product we had a good idea of where to start looking.&#160; We then ultimately debugged into the unit test &amp; realized that it had a config switch that added some additional optimizations which the dev had forgotten to enable in the product.</p>  <h2>Build it &amp; they will come</h2>  <p>All this to say whenever you build any piece of code, there are sure to be bugs to come from it. Teams must not view something as just test code &amp; therefore hold it to a lower quality bar, otherwise it will quickly cost them time &amp; invalidate their results.&#160; </p>  <p>Similarly as a tester you get to build all kinds of infrastructure to help make the team more efficient. This also means you get to learn all kinds of new technology.&#160; Need to build a new report?&#160; What tech do you want to use to build it? Why not write it in Silverlight or WPF to learn something new?&#160; You get to be the PM, Dev, &amp; Tester for these types of items.&#160; Just remember you want to test it thoroughly, otherwise there might be a bug that will bite you later.</p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test–Proving your feature</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-testproving-your-feature</link>
      <pubDate>Mon, 15 Aug 2011 02:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/08/15/challenges-in-testproving-your-feature/</guid>
      <description><![CDATA[Technorati Tags: SDET,Test When you take on a feature to test, how does one prove it is...]]></description>
      <content:encoded><![CDATA[<p>   <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:deb0e3cf-e3a8-4fc7-8044-20cdb483d9dc" class="wlWriterEditableSmartContent">Technorati Tags: <a href="https://technorati.com/tags/SDET" rel="tag">SDET</a>,<a href="https://technorati.com/tags/Test" rel="tag">Test</a></div> When you take on a feature to test, how does one prove it is right?&#160; Generally you might work off some checklist of buckets or areas like functional, globalization, security, boundary, localization, performance, stress, etc. Then say once you have run all the tests you came up with &amp; made sure they passed, then it must be done right?&#160; As alluded to earlier there is also the question of did you build the right feature for the customer?</p>  <p>The below picture has circulated before on how the various components of product development looked at a simple problem.</p>  <p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://farm1.static.flickr.com/5/10160285_8d3c50f724_o.gif" width="605" height="454" /></p>  <p>One might add to this “How the tester tested it”</p>  <p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://eckiller.com/wp-content/uploads/2011/03/c6974303rd-swingset.jpg.jpg" width="296" height="296" /></p>  <p>Part of test’s responsibility is to prove that their feature is correct.&#160; This includes not only that it is functionally correct but that it is actually what the customer wants\needs.</p>  <h2>Customer Correctness - Involve your customers</h2>  <p>I covered this in the previous post about <a href="https://blogs.msdn.com/b/darrylru/archive/2011/03/22/challenges-in-test-knowing-your-customer.aspx">knowing your customer</a>, but it is worth reiterating as it is highly important.&#160; Involving your customer as early &amp; as often as possible will help you increase the likely hood of delivering what they really need.&#160; There can be obstacles such as maybe you are creating something brand new so your customer has not seen anything like it before or maybe you have competitive requirements to limit disclosures.&#160; Yet these are usually not insurmountable, at the bare minimum you can solicit feedback from co-workers on the work that you are doing.&#160; Is what you are working on targeted at a less technical customer &amp; all your co-workers live &amp; write code, then what about your business admin?</p>  <h2></h2>  <h2>Functional Correctness - Quod erat demonstrandum (QED)</h2>  <p>A typical question in a product release is how do we know that the product is done &amp; ready for release.&#160; This can fill up many meetings &amp; even books about the subject.&#160; One aspect of this I wanted to focus on was thinking beyond the procedure of manually coming up with a set of test cases, build them, &amp; then run them.&#160; Instead, here at Microsoft many testers have degrees in Computer Science\Engineering and many have advanced degrees including Masters or PhDs.&#160; As such we should borrow from our math background &amp; think how you might prove the feature is correct (i.e. <a href="https://en.wikipedia.org/wiki/Q.E.D">QED</a>)</p>  <p>This is more aspirational, but I have seen concepts &amp; ideas used in test to attempt to do this exact thing. As such this is one of the hard problems in test. More broadly these are collectively known as <a href="https://en.wikipedia.org/wiki/Formal_methods">Formal Methods</a> and this is one area which MSR has made considerable investment.</p>  <h3>Model Based Testing</h3>  <p>One example of how you can prove a feature is correct is model based testing.&#160; It is an interesting aspect of how you might prove that a system is correct.&#160; I am personally still learning more about model based testing &amp; how we can use it in our testing tool belt when developing products.&#160; So this is just an intro to the concept for those unaware.</p>  <p>The basic concept is that if you can map out a conceptual model of your product, then you can use an algorithm to walk your model which will then generate many of the test cases for you.&#160; Just taking the time to create a model will greatly help in understanding your product and typically cause you to find questions which will then feedback into your dev &amp; PM specs. For example, what happens if we are in X state &amp; then Y happens?</p>  <p><a href="https://research.microsoft.com/en-us/projects/specexplorer/">Microsoft Research</a> has done some work around Model Based Testing (<a href="https://en.wikipedia.org/wiki/Model-based_testing">MBT</a>) and since has been released as a power tool for Visual Studio 2010 called <a href="https://visualstudiogallery.msdn.microsoft.com/271d0904-f178-4ce9-956b-d9bfa4902745/">Spec Explorer</a>.&#160; You can even use Spec Explorer to convert your understanding of the spec into a programmatic model and then when the model is explored find if there are invalid transitions that occur based on some constraints helping you find bugs in your spec &amp; design early on.</p>  <p>One key consideration when building out a model of a system is the scope of a given model. If you attempt to model in detail a complex system, then you will run into state explosion where you will have way too many permutation &amp; combinations to be useful.&#160; Instead you should focus on modeling some specific area you are testing to minimize this problem.</p>  <h3>Oracles</h3>  <p>In order to verify any test result, a tester must develop an <a href="https://en.wikipedia.org/wiki/Oracle">oracle</a> to determine if the result of a test should pass or fail. Sometimes these oracles are extremely simple.&#160; The simplest being hard coding the answer to each of their tests.&#160; Yet this limits the number of tests to the ability of the tester to generate tests &amp; answers to those tests.&#160; Those answers must be maintained as the product changes over the course of development. On the other extreme is to perform complex calculations which simulate the product. The problem here is the classic of if test is testing product code who is testing this complex test code?&#160; </p>  <p>MBT solves this by using the model you create about your product. Tools like Spec Explorer explicitly capture state in the model and allow for the model to return values, which can then be mapped to actual values which the system will return.&#160; So tests generated by Spec Explorer essentially have the oracle embedded in each generated test case. But to do this, the model may have to closely reflect the algorithmic complexity of the system being tested. This can lead to high cost of model building. MBT approaches suggest to solve this by using a collection of models, including the possibility of building composite models (i.e. A more complex model built on top of simpler ones) </p>  <p>There are also other possibilities. Take another example of how one might leverage mathematic ideas is how you can test something as Query &amp; Set calculation in Forefront Identity Manager (FIM).&#160; Given a complex problem to test, the test writer needs to create an oracle or way to verify the results that the product is producing. The complexity of tests can be limited by the imagination &amp; ability of the tester to validate their results.&#160; Yet if you can leverage something as an oracle to verify the correctness of another item.&#160; In the case of query if we can express a dataset in another form &amp; translate our query against that dataset into a different form, then we can create a simple oracle.&#160; So taking Query in FIM, we know that the query is given in XPath.&#160; Conveniently enough XPath is typically used for querying an XML document.&#160; So now if we can represent our dataset as XML, then we could use XPath with .Net as that oracle.</p>  <p>This leverages the concept of transitivity in mathematics. Basically if A=B &amp; B=C then A=C. Or in our case if it is true that .Net XPath returns a valid search result for a XML document and we represent our dataset as a XML document, then this will give us our answer\oracle. This has the advantage of us being able to issue complex tests &amp; leverage existing work to validate our new work.&#160; Otherwise we would have to hard code our own test inputs &amp; expected outputs or create a verification algorithm which could reach the complexity of the product’s algorithm.&#160; </p>  <p>There are of course some assumptions &amp; limitations here. First we are assuming that the .Net XPath of a XML Document returns the correct answer, but there may be bugs that cause it not to.&#160; Secondly we may have data or queries that we are unable to represent appropriately. These are items the tester has to evaluate as they are determining their approach &amp; may choose to do additional testing around the limitations of their approach.</p>  <p>Now that we have Query’s oracle we can use transitivity again and use Query as an oracle for Sets.&#160; Sets makes a bunch of complex calculates on the fly. As such we can build a test case generator based on some descriptive language &amp; then just turn around and verify that all the Sets that are calculated on the fly are correct by walking the Set memberships &amp; checking them with a simple query.</p>  <p><strong>Note</strong>: I don’t claim credit for the above solutions using in testing Query &amp; Sets in FIM. These were great ideas that other testers on the team developed for dealing with testing these hard problems.</p>  <h2>Conclusion</h2>  <p>As a tester you should consider not just does your feature conform to the spec that you have been given, but is the spec &amp; design correct to start with.&#160; This must include rationalizing it against your customer’s needs.&#160; Additionally a tester should move beyond just simplistic functional testing of a complex system but how they can prove the correctness of their feature.&#160; Proving correctness should move beyond static validation of 1+1=2 and more into leveraging the testers backgrounds in mathematics and other algorithmic approaches where applicable. </p>  <p>Ultimately when developing your test strategy here are a couple questions you should strive to answer:</p>  <ul>   <li>Is this the right feature for my customer?</li>    <ul>     <li>To be right it must include solving a customer problem &amp; delivered in a way that they can consume it.</li>   </ul>    <li>How am I proving that the feature is functionally correct?</li>    <li>What are the limitations &amp; assumptions of my approach?</li>    <li>Am I testing my feature in a way to cover how my customers expect to use it?</li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>Pasting Code</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/pasting-code</link>
      <pubDate>Mon, 09 May 2011 09:19:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/05/09/pasting-code/</guid>
      <description><![CDATA[I have been looking around for a bit for a way to paste code for blog posts.&#160; My requirements...]]></description>
      <content:encoded><![CDATA[<p>I have been looking around for a bit for a way to paste code for blog posts.&#160; My requirements were pretty simple:</p>  <ol>   <li><strong>Able to paste code from blog </strong>- such that readers could copy &amp; paste code into their own editor</li>    <li><strong>Syntax highlighting – </strong>Syntax highlight just makes things easier to read</li>    <li><strong>Minimize scrollbars – </strong>Avoid requiring scrollbars to scroll through the code</li> </ol>  <p>As such, I have checked out several &amp; the one I found to work the best so far is the <a href="https://plugins.live.com/writer/detail/paste-as-visual-studio-code">Paste As Visual Studio Code</a> add-in for Live Writer.&#160; Ideally, I could use something not specific to Live Writer such as <a href="https://visualstudiogallery.msdn.microsoft.com/98fef791-eb65-4cdf-bf84-077b98c234cf/">Copy As HTML</a> add-in for Visual Studio, but that is currently only supported for VS 2008.</p>  <p>If you have a favorite tool for copying &amp; pasting code, let me know.&#160; One addition I would like is the ability to hide\show code in my blog posts to avoid cluttering it up too much.</p>]]></content:encoded>
    </item>
    <item>
      <title>DataContract Serialization with Generics &amp; Read-only Properties</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/datacontract-serialization-with-generics-read-only-properties</link>
      <pubDate>Wed, 04 May 2011 15:25:25 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/05/04/datacontract-serialization-with-generics-read-only-properties/</guid>
      <description><![CDATA[Recently I have been messing around with figuring out how to serialize some data back &amp; forth...]]></description>
      <content:encoded><![CDATA[<p>Recently I have been messing around with figuring out how to serialize some data back &amp; forth between two applications.&#160; The code in particular leveraged several interfaces, classes with readonly properties, &amp; generics.&#160; This caused a couple problems with serialization which I thought might be useful to share for others that run into a similar problem.</p>  <p>Take for instance the following code:</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:36eb7a6b-98fa-49c3-8a3e-233eea16a1ee" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; overflow: auto; padding: 2px 5px;"><span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Program</span><br> {<br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">void</span> Main()<br>     {<br>     <br>         <span style="color:#2b91af">Class1</span> m = <span style="color:#0000ff">new</span> <span style="color:#2b91af">Class1</span>(<span style="color:#0000ff">new</span> <span style="color:#2b91af">MyClass</span>&lt;<span style="color:#0000ff">string</span>&gt;(<span style="color:#a31515">&quot;Test&quot;</span>));<br>         <span style="color:#0000ff">string</span> xml = m.Serialize();<br>         <span style="color:#2b91af">Class1</span> m2 = <span style="color:#2b91af">Class1</span>.Deserialize(xml);<br> <br>         <span style="color:#2b91af">Debug</span>.Assert(m.Value.ToString() == m2.Value.ToString());<br>     }<br> }<br> <br> [<span style="color:#2b91af">Serializable</span>]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">MyClass</span>&lt;T&gt; <span style="color:#0000ff">where</span> T : <span style="color:#2b91af">IComparable</span><br> {<br>     <span style="color:#0000ff">readonly</span> T item;<br> <br>     <span style="color:#0000ff">public</span> T Item { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> item; } }<br> <br>     <span style="color:#0000ff">public</span> MyClass(T obj)<br>     {<br>         item = obj;<br>     }<br> }<br> <br> [<span style="color:#2b91af">Serializable</span>]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Class1</span><br> {<br>     <span style="color:#0000ff">public</span> Class1(<span style="color:#0000ff">object</span> val)<br>     {<br>         value = val;<br>     }<br>     <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">string</span> Serialize()<br>     {<br>         <span style="color:#2b91af">XmlSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">XmlSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#2b91af">StringWriter</span> writer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringWriter</span>();<br>         serializer.Serialize(writer, <span style="color:#0000ff">this</span>);<br>         writer.Close();<br>         <span style="color:#0000ff">return</span> writer.ToString();<br>     }<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">Class1</span> Deserialize(<span style="color:#0000ff">string</span> xml)<br>     {<br>         <span style="color:#2b91af">XmlSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">XmlSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#2b91af">StringReader</span> sr = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringReader</span>(xml);<br>         <span style="color:#2b91af">Class1</span> item = (<span style="color:#2b91af">Class1</span>)serializer.Deserialize(sr);<br>         <span style="color:#0000ff">return</span> item;<br>     }<br>     <br>     <span style="color:#0000ff">readonly</span> <span style="color:#0000ff">object</span> value;<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">object</span> Value { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> value; } }<br> }</div> </div> </div>  <h2>&#160;</h2>  <h2>Parameterless Constructor</h2>  <p>If you run this through &amp; try to serialize &amp; then deserialize you will run into a problem just serializing this. The first error you will hit is:</p>  <blockquote>   <p><font face="Consolas">System.InvalidOperationException was unhandled        <br />&#160; Message=There was an error generating the XML document.         <br />&#160; Source=System.Xml         <br />&#160; StackTrace:         <br />&#160;&#160;&#160;&#160;&#160;&#160; at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)         <br />&#160;&#160;&#160;&#160;&#160;&#160; at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)         <br />&#160;&#160;&#160;&#160;&#160;&#160; at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)         <br />&#160;&#160;&#160;&#160;&#160;&#160; at MyNamespace.Class1.Serialize()         <br />&#160;&#160;&#160;&#160;&#160;&#160; at MyNamespace.Program.Main()         <br />&#160; InnerException: System.InvalidOperationException         <br />&#160;&#160;&#160;&#160;&#160;&#160; Message=MyNamespace.MyClass`1[System.String] cannot be serialized because it does not have a parameterless constructor.         <br />&#160;&#160;&#160;&#160;&#160;&#160; Source=System.Xml</font>       <br /></p> </blockquote>  <p>Xml Serialization requires you to have a parameterless constructor, so you can either add one, or switch to using WCF <a href="https://msdn.microsoft.com/en-us/library/ms733127.aspx">DataContract Serialization</a>. This is as simple as changing the attribute on your Classes from [Serializable] to [DataContract] and then updating your Serialize &amp; Deserialize methods. This will allow you to successfully serialize &amp; deserialize the objects without an exception.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7acc8282-e955-4391-9a38-5521085e2327" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; overflow: auto; padding: 2px 5px;">[<span style="color:#2b91af">DataContract</span>]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">MyClass</span>&lt;T&gt; <span style="color:#0000ff">where</span> T : <span style="color:#2b91af">IComparable</span><br> {<br>     <span style="color:#0000ff">readonly</span> T item;<br> <br>     <span style="color:#0000ff">public</span> T Item { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> item; } }<br> <br>     <span style="color:#0000ff">public</span> MyClass(T obj)<br>     {<br>         item = obj;<br>     }<br> }<br> <br> [<span style="color:#2b91af">DataContract</span>]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Class1</span><br> {<br>     <span style="color:#0000ff">public</span> Class1(<span style="color:#0000ff">object</span> val)<br>     {<br>         value = val;<br>     }<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">string</span> Serialize()<br>     {<br>         <span style="color:#2b91af">StringBuilder</span> xml = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringBuilder</span>();<br>         <span style="color:#2b91af">DataContractSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataContractSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#0000ff">using</span> (<span style="color:#2b91af">XmlWriter</span> xw = <span style="color:#2b91af">XmlWriter</span>.Create(xml))<br>         {<br>             serializer.WriteObject(xw, <span style="color:#0000ff">this</span>);<br>             xw.Flush();<br>             <span style="color:#0000ff">return</span> xml.ToString();<br>         }<br>     }<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">Class1</span> Deserialize(<span style="color:#0000ff">string</span> xml)<br>     {<br>         <span style="color:#2b91af">Class1</span> newItem;<br>         <span style="color:#2b91af">DataContractSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataContractSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#2b91af">StringReader</span> textReader = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringReader</span>(xml);<br>         <span style="color:#0000ff">using</span> (<span style="color:#2b91af">XmlReader</span> xr = <span style="color:#2b91af">XmlReader</span>.Create(textReader))<br>         {<br>             newItem = (<span style="color:#2b91af">Class1</span>)serializer.ReadObject(xr);<br>         }<br>         <span style="color:#0000ff">return</span> newItem;<br>     }<br>     <br>     <span style="color:#0000ff">readonly</span> <span style="color:#0000ff">object</span> value;<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">object</span> Value { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> value; } }<br> }</div> </div> </div>  <h2>&#160;</h2>  <h2>Serializing Read-only Properties</h2>  <p>Next you will his the Debug.Assert which was a check to ensure we are serializing the read-only property was correctly being populated &amp; in this case it is not.&#160; The reason being is that XmlSerialization will automatically attempt to serialize all public properties, but WCD DataSerialization does not automatically attempt to serialize any properties.&#160; So you need to decorate any item you want serialized with a [DataMember] tag.&#160; This is great because now for readonly properties you can just mark the underlying private data as the DataMember.</p>  <h2></h2>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3b77fe21-97bb-44fa-9946-b1af7dca83ec" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; max-height: 300px; overflow: auto; padding: 2px 5px;">[<span style="color:#2b91af">DataMember</span>]<br> <span style="color:#0000ff">readonly</span> <span style="color:#0000ff">object</span> value;<br> <br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">object</span> Value { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> value; } }</div> </div> </div>  <h2>&#160;</h2>  <h2>Serializing Generics</h2>  <p>The next problem you will hit is a SerializationException about not being able to Serialize the generic MyClassOfString, aka MyClass&lt;string&gt;</p>  <blockquote>   <p><font face="Consolas">System.Runtime.Serialization.SerializationException was unhandled        <br />&#160; Message=Type 'MyNamespace.MyClass`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' with data contract name 'MyClassOfstring:</font><a href="https://schemas.datacontract.org/2004/07/MyNamespace'"><font face="Consolas">https://schemas.datacontract.org/2004/07/MyNamespace'</font></a><font face="Consolas"> is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.        <br />&#160; Source=System.Runtime.Serialization</font></p> </blockquote>  <p>To resolve this you will need to use the <a href="https://msdn.microsoft.com/en-us/library/ms730167.aspx">KnownType</a> attribute &amp; there are a couple options: </p>  <ol>   <li>Generically implement serialization </li>    <li>Explicitly list the known types </li> </ol>    <h3>Generic KnownType</h3>  <p>Generic serialization is nice as the serialize since you don’t have to decorate your code&#160; with the various possible classes used for your generic.&#160; To implement it you add the KnownTypes attribute to your class with a string of the method name to call.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:813c3076-c8db-4031-8ae6-778e187078d7" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; overflow: auto; padding: 2px 5px;">[<span style="color:#2b91af">DataContract</span>]<br> [<span style="color:#2b91af">KnownType</span>(<span style="color:#a31515">&quot;GetTypes&quot;</span>)]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">MyClass</span>&lt;T&gt; <span style="color:#0000ff">where</span> T : <span style="color:#2b91af">IComparable</span><br> {<br>     <span style="color:#0000ff">readonly</span> T item;<br> <br>     <span style="color:#0000ff">public</span> T Item { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> item; } }<br> <br>     <span style="color:#0000ff">public</span> MyClass(T obj)<br>     {<br>         item = obj;<br>     }<br> <br>     <span style="color:#0000ff">static</span> <span style="color:#2b91af">Type</span>[] GetTypes()<br>     {<br>         <span style="color:#0000ff">return</span> <span style="color:#0000ff">new</span> <span style="color:#2b91af">Type</span>[] { <span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">MyClass</span>&lt;T&gt;) };<br>     }<br> }</div> </div> </div>    <h3>Explicit KnownType</h3>  <p>If you do the above then you will wind up with an exception during deserialization now since Class1 does not how to deserialize MyClassOfString. As the deserializer you will need to explictly state what types you expect.&#160; In this case you can do it with a single attribute on the top.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:28c13f8e-fbcc-430c-94f1-56c09ee32eaf" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; overflow: auto; padding: 2px 5px;">[<span style="color:#2b91af">DataContract</span>]<br>     [<span style="color:#2b91af">KnownType</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">MyClass</span>&lt;<span style="color:#0000ff">string</span>&gt;))]<br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Class1</span></div> </div> </div>  <h2>&#160;</h2>  <h2>Final Results</h2>  <p>At this point the class will successfully serialize &amp; deserialize fully. Due to the nature of my example, the step of using the GetTypes method is not required since I am doing both serialization &amp; deserialization in Class1, but it is useful when that is not the case.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:68fe2296-f9e3-44d1-a1dd-bf79803f6bae" class="wlWriterEditableSmartContent"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ebebeb; overflow: auto; padding: 2px 5px;"><span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Program</span><br> {<br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">void</span> Main()<br>     {<br>     <br>         <span style="color:#2b91af">Class1</span> m = <span style="color:#0000ff">new</span> <span style="color:#2b91af">Class1</span>(<span style="color:#0000ff">new</span> <span style="color:#2b91af">MyClass</span>&lt;<span style="color:#0000ff">string</span>&gt;(<span style="color:#a31515">&quot;Test&quot;</span>));<br>         <span style="color:#0000ff">string</span> xml = m.Serialize();<br>         <span style="color:#2b91af">Class1</span> m2 = <span style="color:#2b91af">Class1</span>.Deserialize(xml);<br> <br>         <span style="color:#2b91af">Debug</span>.Assert(m.Value.ToString() == m2.Value.ToString());<br>     }<br> }<br> <br> [<span style="color:#2b91af">DataContract</span>]<br> [<span style="color:#2b91af">KnownType</span>(<span style="color:#a31515">&quot;GetTypes&quot;</span>)]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">MyClass</span>&lt;T&gt; <span style="color:#0000ff">where</span> T : <span style="color:#2b91af">IComparable</span><br> {<br>     <span style="color:#0000ff">readonly</span> T item;<br> <br>     <span style="color:#0000ff">public</span> T Item { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> item; } }<br> <br>     <span style="color:#0000ff">public</span> MyClass(T obj)<br>     {<br>         item = obj;<br>     }<br> <br>     <span style="color:#0000ff">static</span> <span style="color:#2b91af">Type</span>[] GetTypes()<br>     {<br>         <span style="color:#0000ff">return</span> <span style="color:#0000ff">new</span> <span style="color:#2b91af">Type</span>[] { <span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">MyClass</span>&lt;T&gt;) };<br>     }<br> }<br> <br> [<span style="color:#2b91af">DataContract</span>]<br> [<span style="color:#2b91af">KnownType</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">MyClass</span>&lt;<span style="color:#0000ff">string</span>&gt;))]<br> <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">Class1</span><br> {<br>     <span style="color:#0000ff">public</span> Class1(<span style="color:#0000ff">object</span> val)<br>     {<br>         value = val;<br>     }<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">string</span> Serialize()<br>     {<br>         <span style="color:#2b91af">StringBuilder</span> xml = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringBuilder</span>();<br>         <span style="color:#2b91af">DataContractSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataContractSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#0000ff">using</span> (<span style="color:#2b91af">XmlWriter</span> xw = <span style="color:#2b91af">XmlWriter</span>.Create(xml))<br>         {<br>             serializer.WriteObject(xw, <span style="color:#0000ff">this</span>);<br>             xw.Flush();<br>             <span style="color:#0000ff">return</span> xml.ToString();<br>         }<br>     }<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">Class1</span> Deserialize(<span style="color:#0000ff">string</span> xml)<br>     {<br>         <span style="color:#2b91af">Class1</span> newItem;<br>         <span style="color:#2b91af">DataContractSerializer</span> serializer = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataContractSerializer</span>(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Class1</span>));<br>         <span style="color:#2b91af">StringReader</span> textReader = <span style="color:#0000ff">new</span> <span style="color:#2b91af">StringReader</span>(xml);<br>         <span style="color:#0000ff">using</span> (<span style="color:#2b91af">XmlReader</span> xr = <span style="color:#2b91af">XmlReader</span>.Create(textReader))<br>         {<br>             newItem = (<span style="color:#2b91af">Class1</span>)serializer.ReadObject(xr);<br>         }<br>         <span style="color:#0000ff">return</span> newItem;<br>     }<br>     <br>     [<span style="color:#2b91af">DataMember</span>]<br>     <span style="color:#0000ff">readonly</span> <span style="color:#0000ff">object</span> value;<br> <br>     <span style="color:#0000ff">public</span> <span style="color:#0000ff">object</span> Value { <span style="color:#0000ff">get</span> { <span style="color:#0000ff">return</span> value; } }<br> }</div> </div> </div>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test – Knowing your customer</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-test-knowing-your-customer</link>
      <pubDate>Tue, 22 Mar 2011 10:03:34 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/03/22/challenges-in-test-knowing-your-customer/</guid>
      <description><![CDATA[So you know your product &amp; the code, what else is there?&#160; Your customer!&#160; They are the...]]></description>
      <content:encoded><![CDATA[<p>So you know your product &amp; the code, what else is there?&#160; Your customer!&#160; They are the ones that will be using your product to solve their real problems.</p>  <h2>Knowing your customer</h2>  <p>So your PM, Dev, &amp; you have implemented the greatest feature.&#160; Do you know what problem this is going to solve for your customer?&#160; Do you know how they expect to use it?&#160; If they are going to be deploying your product do you know what type of topology they will be using?</p>  <p>A good example of this is the <a href="https://articles.cnn.com/1999-09-30/tech/9909_30_mars.metric.02_1_climate-orbiter-spacecraft-team-metric-system?_s=PM:TECH">Mars Rover</a> that was lost in 1999.&#160; One team designed their system using English units, but the other team was actually using Metric units.&#160; I bet their tester ensured the feature worked wonderfully but there was one costly assumption that was overlooked &amp; after a 286 day journey the probe was burned up in the atmosphere.</p>  <p>As a test team you will be charged with figuring out how you will be testing the product. The assumptions you make will wind up impacting your customer &amp; their experience with your product.</p>  <h2>Developer Bias – “It works on my box”</h2>  <p>During the course of development it is easy for something I will call developer bias to set in.&#160; You have been working on the product &amp; seen it evolve over time. You can easily grow accustomed to issues or why something might work the way it does even though it is not intuitive to your customer. </p>  <p>One refrain that exemplifies this is a phrase you might hear from a developer of “It works on my box.”, when you report an issue with the product.</p>  <p>Take for example a server product which uses SQL as a datastore. During development most of the team will likely install the product all on a single box.&#160; Who wants to maintain multiple machines if they don’t have to after all.&#160; But customers won’t be running in that configuration &amp; will likely have a SQL machine &amp; run your server on a separate machine.&#160; Does your product work in that topology?&#160; Oh &amp; how did you install your SQL server?&#160; SQL server can have named instances.&#160; Can you install to a named instance?&#160; Does your product work when installed to a named instance?</p>  <h2>Customer Personas – “It works great for me”</h2>  <p>Although you may be one of the target customers for your product, are you a true representative of all your customers?&#160; What does a teenager expect form your product vs. a stay-at home mom?&#160; Each customer has their own unique needs &amp; scenarios that they are interested in, you need to be aware of them and how you can cover them in your testing.</p>  <p>Let’s look at something such as Kinect for Xbox 360 &amp; a feature as simple as someone waving to launch the Kinect Hub.&#160; Seems pretty straight forward right?&#160; Interestingly enough <a href="https://www.ehow.com/how_2097453_wave-a-hand.html">eHow</a> even has instructions that are as simple as 1, 2, 3.</p>  <ol>   <li>Lift your hand toward the person to whom the wave is being directed.</li>    <li>Spread the thumb away from the other fingers of the hand and hold the rest of them together.</li>    <li>Pivot at the elbow &amp; move your hand from side to side several times</li> </ol>  <p>It all seems so simple, but do a sampling of people &amp; have them wave at you.&#160; You will find a large variance in how they actually wave to you.&#160; Some might just slightly move their wrist, others might move their hand back &amp; forth very rapidly.&#160; Are kids part of your customer set?&#160; They can wave even more differently with their hand almost sideways moving more up &amp; down.</p>  <h2></h2>  <h2>Conclusion</h2>  <p>But I am just a tester, isn’t PM the one that talks to customers?&#160; They do, but do they understand the assumptions you are making in testing?&#160; Have you used the many resources you have to find out information from your customers?&#160; At Microsoft there are several avenues to get this information: <a href="https://social.technet.microsoft.com/Forums/en/categories">TechNet Forums</a>, Pre release programs through <a href="https://connect.microsoft.com">connect.microsoft.com</a>, various conferences, external user groups, internal distribution lists, <a href="https://mvp.support.microsoft.com/">MVPs</a>, etc.&#160; Work with your team to reach out to your customers, I am sure they will be more than happy to help you build a great product that will help solve their problems.</p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test – Knowing the code &amp; sometimes ignoring it</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-test-knowing-the-code-sometimes-ignoring-it</link>
      <pubDate>Mon, 14 Mar 2011 11:54:33 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/03/14/challenges-in-test-knowing-the-code-sometimes-ignoring-it/</guid>
      <description><![CDATA[A tester just needs to master the art of understanding their product &amp; then file bugs based on...]]></description>
      <content:encoded><![CDATA[<p>A tester just needs to master the art of understanding their product &amp; then file bugs based on their findings right?&#160; Wishful thinking! You better have the technical understanding of the code your developer is writing if you intend to properly test it.</p>  <h3>Knowing the code &amp; sometimes ignoring it</h3>  <p>So understanding how your product works is a good start, but as mentioned earlier a tester needs to have breath &amp; be able to go deep.&#160; Part of that depth is understanding the code behind their product.</p>  <p>There are a couple examples of why you will need to have this depth: <ol>   <li>Designing your automation frameworks </li>    <li>Debugging your product </li> </ol> </p>    <h3>Designing your automation frameworks</h3>  <p>While development is designing &amp; implementing the product you will need to figure out how you are going to test the product, while also being involved in the product design itself. Understanding how the code is implemented is going to help with designing your automation.&#160; For example if you have a typical 3 tier application, how is the UI talking to the middle tier?&#160; Are those APIs public?&#160; Do they give you what you need to write automation?&#160; How can you extend them for what you need?&#160; Is there a better way to design the product to make it more testable?</p>  <h3>Debugging your product</h3>  <p>Part of being a tester means you are one of the first customers of your product.&#160; You are developing tests against a moving target as developers are implementing new features &amp; making changes.&#160; One day a test may be passing &amp; the next it fails. Is it a test issue or a product issue that is causing it to fail?&#160; Your product may not have much manageability yet so there are no good events in the log that you can use.&#160; The only thing left is being ready to strap a debugger to the product &amp; step through the code to understand where things are going wrong.&#160; If it is a product change that broke your tests you may need to understand how to update your tests to work again. Oh &amp; when you are done, you’ll want to file a bug to improve the manageability of the product. You are doing something a customer would be doing and they won’t be able to strap a debugger to it. You’ll want enough information in the logs that ideally a customer could resolve the problem.</p>  <h3>Ignoring the code</h3>  <p>So you now know your product’s code inside &amp; out.&#160; You are able to debug &amp; even provide your developer with proposed fixes.&#160; You might even have helped write some of the features in your product.&#160; Now forget everything you know about the code.</p>  <p>What?! You might say, I worked so hard to figure it all out. Yep &amp; if you are not careful you may make some of the same assumptions that the developer did when they wrote the feature.&#160; That means you run the risk of designing your test cases around the code &amp; missing some juicy bugs.&#160; You need to step back &amp; challenge any and all assumptions that you might be making.</p>  <p>Along with challenging the assumptions made in the code, don’t forget to challenge &amp; look at everything from the customer’s eyes.&#160; Does the instructions we provide in the UI make sense to the end user or are we using 3 different terms to reference something because it’s name has changed over the course of development.&#160; One powerful tool here is to swap features with another tester &amp; try each other’s area out.&#160; If they can’t figure out how to use your feature, don’t dismiss it as they are new &amp; don’t understand the product enough.&#160; They are likely stumbling over some areas that a real customer would &amp; since you are neck deep in your feature &amp; code, of course how to use it is obvious to you.&#160; It likely won’t be obvious to your customer, so look for how you can improve that also.</p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test – Knowing Your Product</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-test-knowing-your-product</link>
      <pubDate>Mon, 07 Mar 2011 12:01:45 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/03/07/challenges-in-test-knowing-your-product/</guid>
      <description><![CDATA[So you accepted the challenge of being a tester, got your machine setup with the latest version of...]]></description>
      <content:encoded><![CDATA[<p>So you accepted the challenge of being a tester, got your machine setup with the latest version of the code, installed your product, and your manager has given you a hot new feature to test.&#160; It seems so easy. You think you can just focus on that feature, but you better think again.</p>  <h3>Problem introduction</h3>  <p>Take for example a feature called Query in Forefront Identity Manager (<a href="https://www.microsoft.com/fim">FIM</a>).&#160; You start out on the feature &amp; learn that it takes a query in the form of XPath &amp; then returns the results of that query.&#160; You have some standard set of operators that you expect to find such as =, &gt;, &lt;, and or, not along with some functions like starts-with, ends-with, dateTime, etc.&#160; The specific operators are not the important component here, but if you are so inclined you can view the details <a href="https://msdn.microsoft.com/en-us/library/ee652287.aspx">here</a>.</p>  <h3>Knowing your product</h3>  <p>As a tester you might be prone to take this problem &amp; run with it to create a bunch of test cases around the various combinations of operators &amp; data values.&#160; Initially you find several bugs &amp; you are keeping your developer pretty busy.&#160; You even think about some of the various buckets of tests like boundary, localization, globalization, performance, stress, security, etc.&#160; Are you now ready to declare your testing complete?</p>  <p>One of the things a good tester needs to do is fully understand the problem space they are working in &amp; also how it may be changing over the course of the product lifecycle.&#160; For example in this case the design of FIM leverages the XPath filters of Query in a feature called Sets.&#160; These Sets are then used in another feature called Management Policy Rules (MPRs). MPRs are core to the product in determining both if you are allowed to do something.&#160; These MPRs also can trigger another feature Workflows which can then perform various actions in the product.</p>  <p>Yikes! You have just gone from a tester of a single feature to something that is deeply involved in 4 different features which are ultimately core to your product.&#160; And note that these features are likely covered by different developers, testers, &amp; PMs.&#160; So you may not be responsible for these other feature areas, but you will need to know &amp; understand how your feature interacts with them.&#160; Even better if you are in active development the design may be rapidly changing as your team reacts to requests in future milestones, so what you knew yesterday may not be true today.</p>  <h3>What’s the Impact?</h3>  <p>With knowing your product you can now start to evaluate the level of coverage you have &amp; where you might want to add more coverage.&#160; One example of how you will need to use this knowledge is justifying the impact of a bug.&#160; Let’s say you found a bug in Query which when searching for “Smith” exclusively returns all people with the last name of Smith, but also Smithers are returned at the end.&#160; It is the day before you ship the product &amp; the question will invariably be asked: “Can this bug wait until the next patch, service pack, or release?”&#160; Or put more simply, “What bad things will happen if we don’t fix this right now?”</p>  <p>Now your knowledge of the product is key. When the feature was originally designed it was just used for searching a list of users or groups, so returning a few extra users would be no big deal right?&#160; I mean who would page through the list of all Smiths in a phone book to see that there are a few extra results at the end?&#160; But wait remember from above what you learned about the product &amp; understand where else your feature gets used which is granting rights in the system &amp; kicking off workflows.&#160; So now this bug has increased in importance since you would potentially be granting rights to users &amp; starting processes which are not intended.</p>  <p>So as you can see as a tester you better know your product almost as good as anyone else to help ensure you have the appropriate level of coverage &amp; you don’t get the luxury of just knowing a single feature area but need both depth &amp; breath across features.&#160; If you want to really know your product then no better way than to test it.</p>]]></content:encoded>
    </item>
    <item>
      <title>Challenges in Test – Introduction</title>
      <link>https://docs.microsoft.com/archive/blogs/darrylru/challenges-in-test-introduction</link>
      <pubDate>Mon, 28 Feb 2011 11:53:00 GMT</pubDate>
      <dc:creator><![CDATA[Darryl Russi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/darrylru/2011/02/28/challenges-in-test-introduction/</guid>
      <description><![CDATA[This time of year at Microsoft is when we have what we call our Mid Year Career Discussion (MYCD)....]]></description>
      <content:encoded><![CDATA[<p>This time of year at Microsoft is when we have what we call our Mid Year Career Discussion (MYCD). Note that this is not a Mid Year Review, but instead a Career Discussion as the intent is for you to specifically reflect on &amp; discuss your career development. As such I was reflecting on a topic that I have seen discussed externally. What is an SDET &amp; why would I want to be one?</p>
<p>This series of posts is not by any means authoritative, but instead meant to give you some food for thought about the types of challenges you can expect to face. So if you are considering a position as a SDET with Microsoft &amp; wondering what you might be able to expect, or just a customer curious about the role of a SDET at Microsoft I hope you find the coming posts useful &amp; informative.</p>
<p>In the following series of posts, I will cover the following things that test must do to help develop a successful product.</p>
<ol>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/03/07/challenges-in-test-knowing-your-product.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/03/07/challenges-in-test-knowing-your-product.aspx">Know your product</a> &ndash; </strong>You may be assigned a couple feature areas, but many times just knowing your own area is not enough to ensure good test coverage.</li>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/03/14/challenges-in-test-knowing-the-code-amp-sometimes-ignoring-it.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/03/14/challenges-in-test-knowing-the-code-amp-sometimes-ignoring-it.aspx">Knowing the code &amp; sometimes ignoring it</a> &ndash; </strong>Improving test coverage is about knowing how the product code works &amp; at other times ignoring how it works.</li>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/03/22/challenges-in-test-knowing-your-customer.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/03/22/challenges-in-test-knowing-your-customer.aspx">Knowing your customer</a> &ndash; </strong>Your team has developed a great new whiz bang product, but do you understand the problems that it will solve for your customer &amp; how they will use it?</li>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/08/15/challenges-in-test-proving-your-feature.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/08/15/challenges-in-test-proving-your-feature.aspx">Proving your feature</a></strong> &ndash; It is one thing to test your feature, but how can you prove it is correct?</li>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/08/22/challenges-in-test-impeccable-infrastructure.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/08/22/challenges-in-test-impeccable-infrastructure.aspx">Impeccable Infrastructure</a> &ndash; </strong>Your tests are only as good &amp; useful as the infrastructure that you use to run them.</li>
<li><strong><a title="https://blogs.msdn.com/b/darrylru/archive/2011/08/30/challenges-in-test-ensuring-testability-influencing-design.aspx" href="https://blogs.msdn.com/b/darrylru/archive/2011/08/30/challenges-in-test-ensuring-testability-influencing-design.aspx">Ensuring Testability &amp; Influencing Design</a> &ndash; </strong>Your team is planning the next big thing, using some awesome new technology, but do you have any idea on how you can actually test it?</li>
</ol>
<p>So feel free to follow along &amp; let me know if this information is helpful to you or there are other questions you have.</p>]]></content:encoded>
    </item>
  </channel>
</rss>