<?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>Dave Froslie - Microsoft Development on the Prairie</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/dave_froslie/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/dave_froslie/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 04:59:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Data rollback</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/data-rollback</link>
      <pubDate>Wed, 06 Jul 2016 13:23:43 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1165</guid>
      <description><![CDATA[A major challenge in testing, particularly data driven applications like ERP systems, is managing...]]></description>
      <content:encoded><![CDATA[<p>A major challenge in testing, particularly data driven applications like ERP systems, is managing data during the test execution. For a test to execute reliably, it needs to start from a known state… every single time. How can we make that happen reliably? Fortunately in AX7, a significant testability feature was added to the SysTest framework that enables this behavior. <p>Before describing the new feature, let's dive into the problem a bit further. A book that I highly recommend, <a href="https://www.amazon.com/xUnit-Test-Patterns-Refactoring-Code/dp/0131495054">XUnit Test Patterns: Refactoring Test Code</a>, uses the term fixture to describe the setup for a test. There are several different fixture patterns, but I will focus on only a couple. <p>The <a href="https://xunitpatterns.com/Fresh%20Fixture%20Setup.html">fresh fixture pattern</a> creates a new environment for each test method. This is the most common approach for tests at the bottom of the test pyramid, primarily unit tests (see <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/09/test-automation-pyramid/">this post</a> on the test pyramid). This typically produces the most reliable tests as there is no possible carryover from previous tests. <p>The <a href="https://xunitpatterns.com/Shared%20Fixture.html">shared fixture pattern</a> creates an environment that is reused by many tests. As tests get broader in scope as in integration or business cycle tests, more and more data needs to exist for the test to execute in a reasonable amount of time. This is where a shared fixture is frequently used, but it has its downsides. A significant challenge can be inadvertent state carryover that impacts downstream tests. This situation impacts test reliability, can be very frustrating to debug, and results in lost confidence in the test suite. <p>An ERP system, with its mass of back end, interconnected, data, lends itself to a shared fixture for tests broader than unit tests. Internally, we've come up with different approaches to address the data sharing and fixture tear down challenges over past releases - things like test suites and various isolation approaches. Most of these were "bolt-ons" to the SysTest framework, and all ultimately had some drawbacks. <p>For AX'7', we focused on reliably rolling back data at different layers directly within the SysTest framework. To accomplish this, the transaction savepoint feature in SQL Server was leveraged. Savepoints are created at the start of each class and each method, enabling nested rollback to these known states as part of the teardown process. Because it leverages native SQL capabilities, it is both reliable and fast. <p>Data rollback using SQL transaction savepoints is the default behavior for all SysTest classes. You can choose to disable it at the class level using the SysTestTransaction attribute with the 'NoOp' value. This might be helpful while debugging tests, but you should almost always take the default behavior. <p>Now that we have reliable and fast data rollback, we've discouraged the use of legacy test isolation mechanisms. This has resulted in big reduction of 'flaky' tests… and that has been a huge benefit to our engineering efforts!</p>]]></content:encoded>
    </item>
    <item>
      <title>X++ FormAdaptors – A Simple Example</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/x-formadaptors-a-simple-example</link>
      <pubDate>Mon, 16 May 2016 15:00:51 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1155</guid>
      <description><![CDATA[&nbsp; My last post introduced a testability feature in the new AX called FormAdaptors.&nbsp; That...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>My <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/04/25/x-formadaptors-an-introduction/">last post</a> introduced a testability feature in the new AX called FormAdaptors.&nbsp; That post described changes in the product architecture that enabled FormAdaptors and why they have been so valuable for our internal automated regression testing strategy.&nbsp; In summary, FormAdaptors provide an API to interact with forms from X++ and run server side tests that are fast and reliable.</p> <p>This post provldes a simple example of FormAdaptors so you can get a feel for the API.&nbsp; The form that we’re going to be targeting is the VendParameters form.&nbsp; We’re specifically going to interact with the two controls in the red and green boxes in the screenshot of the form shown below.&nbsp; </p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/05/image591.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;border-top-width: 0px;margin-right: auto" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/05/image_thumb524.png" width="651" height="338"></a></p> <p>The scenario that we want to test is to verify that the green box control gets enabled and defaulted to false whenever the red box control is set to ‘Yes’. <font face="Arial">The red box control is the InvoiceMatching_UseInvoiceMatching control.&nbsp; The green box control is the InvoiceMatching_UseTotalPriceMatching control.&nbsp; </font></p> <p><font face="Arial">The X++ test code shown below implements the test scenario. </font></p> <p><font face="Courier New">/// &lt;summary&gt;<br>/// Tests Invoice totals matching field settings<br>/// &lt;/summary&gt;<br>[SysTestMethod]<br>public void InvoiceMatching_TotalsFieldSettings()<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (VendParametersFormAdaptor vendParameters = VendParametersFormAdaptor::open())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vendParameters.InvoiceMatching_UseInvoiceMatching().setValue(true);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vendParameters.InvoiceMatching_UseTotalPriceMatching().validateEnabled(true);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vendParameters.InvoiceMatching_UseTotalPriceMatching().validate(false);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br></font></p> <p><font face="Arial">The goal for this API is that the test is self explanatory when read… hopefully that is true for you!&nbsp; A few notes on this sample follow:</font></p> <ul> <li><font face="Arial">[SysTestMethod] identifies the X++ method as a test method.</font>  <li><font face="Arial">Each form has a FormAdaptor class associated with it named &lt;FormName&gt;FormAdaptor.&nbsp; The class has multiple static constructors on it, one of which is the open() method shown.</font>  <li><font face="Arial">The FormAdaptor is wrapped in a using statement so the class is properly disposed after use.</font>  <li><font face="Arial">Chaining calls together is how you initiate actions on the form.&nbsp; For example, <font face="Courier New">setValue()</font> is a method on a CheckBoxControl.</font>  <li><font face="Arial">Convenience calls such as </font><font face="Courier New">validateEnabled() </font><font face="Arial">interact with SysTest methods to assert failures and log additional information to aid in debugging failures.&nbsp; </font></li></ul> <p><font face="Arial">Because this test is running on the server, there is no actual visualization of the test running.&nbsp; This is one disadvantage of executing form tests in this manner and was an initial concern for engineers on the team.&nbsp; This quickly went away when they saw how easy it was to debug the tests in addition to the benefits outlined in the previous post.</font></p><font face="Courier New"></font>]]></content:encoded>
    </item>
    <item>
      <title>X++ FormAdaptors - An Introduction</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/x-formadaptors-an-introduction</link>
      <pubDate>Mon, 25 Apr 2016 14:01:56 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1126</guid>
      <description><![CDATA[In recent posts I've mentioned some testability features in AX'7' that have significantly improved...]]></description>
      <content:encoded><![CDATA[<p>In recent posts I've mentioned some testability features in AX'7' that have significantly improved our regression test qualities (<a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/">https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/</a>). The foremost of these features is the addition of X++ FormAdaptors to use for server side execution of form tests. <p>In order to describe FormAdaptors, we first need to take a step back to discuss the architecture changes made to enable a web based client that executes against an Azure service in the new AX. The pictures below comparing AX 2012 with the new AX illustrate how the logical control tier has moved to the server. The physical controls, which are now web friendly HTML and JavaScript based, still reside on the client. <blockquote> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image00120.png"><img title="clip_image001" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image001_thumb15.png" width="266" height="135"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image00213.png"><img title="clip_image002" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image002_thumb8.png" width="244" height="151"></a></p></blockquote> <p>Since the form logic is now running on the server, we have the opportunity to execute form based tests on the server. <p>But why would we want to do this? Don't we want tests to replicate exactly what the customer does with the product? To do that, you would want to exercise the full product stack starting with the physical control on the client… right? <p>Well… I can't put it any other way… that's wrong. And if you don't understand why, you should go back and read the posts that are linked at the end of this post. But let me summarize why we want to do this: <ul> <li>Server side form based tests are 10X to 100X faster than client side tests. Our form based test times are now measured in seconds (at most) whereas AX 2012 client side tests were measured in minutes. <li>Server side form based tests are much more reliable as the number of moving parts in the test interface is drastically reduced. <li>Because of the previous two bullets, it is easier to write more granular tests that are more precise, simpler, and more maintainable. <li>Replicating what the customer does with the product is frequently not the best way to write a regression test that supports the engineering team. <li>Writing test code in the same language and environment as the product code is a win for engineering productivity.</li></ul> <p>Now that I've justified why we want form based server side tests, we still need to author these tests. This is where FormAdaptors come into play. The adaptor pattern "is a software design pattern that allows the interface of an existing class to be used from another interface." (<a href="https://en.wikipedia.org/wiki/Adapter_pattern">https://en.wikipedia.org/wiki/Adapter_pattern</a>). FormAdaptors provide an API for test classes to interact with the form and its controls in a natural, strongly typed way. Under the covers, the API interacts with the form layer on the server ("Logical control" in the picture above) to replicate what a user working with the product in a browser would do. <p>In summary… I guess I wasn't very precise in my opening paragraph. FormAdaptors are really just a wrapper around the big change in testability - the capability to run fast and reliable server side tests written in X++. FormAdaptors are the 'face' of this capability and make it easier to use, which is an important facet of test development as well! More about the FormAdaptor APIs in future posts.. <p>&nbsp; <p>Related: <p><a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/03/achieving-balance-in-testing-software/">https://blogs.msdn.microsoft.com/dave_froslie/2016/02/03/achieving-balance-in-testing-software/</a> <p><a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/">https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/</a> <p><a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/09/test-automation-pyramid/">https://blogs.msdn.microsoft.com/dave_froslie/2016/03/09/test-automation-pyramid/</a> <p><a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/25/testing-is-infinite/">https://blogs.msdn.microsoft.com/dave_froslie/2016/03/25/testing-is-infinite/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Making testing finite–a case study</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/making-testing-finitea-case-study</link>
      <pubDate>Fri, 08 Apr 2016 16:36:27 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1104</guid>
      <description><![CDATA[One of the focus areas for AX'7' regression testing was creating form based automated regression...]]></description>
      <content:encoded><![CDATA[<p>One of the focus areas for AX'7' regression testing was creating form based automated regression tests using the new testability improvements in the product. This post will discuss how the product team prioritized the regression test development. The testability discussion will be covered in a future post. <p>In my last post, <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/25/testing-is-infinite/">Testing is Infinite</a>, I described a risk based approach to test prioritization. While the number of forms in AX'7' is not infinite, we do ship a few thousand forms and creating a regression suite for a few thousand forms is a very large task. We needed to look at the ROI for creating these tests on different forms and prioritize which ones to create tests for first. <p>The first step was to identify the relative importance of the form for regression testing.&nbsp; For this, I used the risk calculation example in <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/25/testing-is-infinite/">my last post</a>: Regression Exposure = (likelihood of regression) X (impact of regression). Here's how I defined the two inputs: <ul> <li>Likelihood of regression - Intuitively, the probability of a regression goes up with the complexity of the artifact being changed. So I embarked on determining a complexity metric for forms. Ultimately, I settled on three factors: number of controls, number of data sources, and number of lines of code. Through the metadata API in the product, I found these three inputs for all forms, normalized each of them, and then used an average of the three factors to arrive at a complexity score for each form.</li> <li>Impact of regression - From a customer perspective, the more often a form is used the bigger the impact of a regression. Fortunately, we have data from AX 2012 showing form opens for customers that opted into SQM data collection. This data was used for the impact… well, actually the log value of the number of open forms to help take out some of the skew in this data.</li></ul> <p>From these two inputs, I calculated the risk exposure, or importance factor, for each form in the product. I took it one more step and categorized the forms into Most Important, High Importance, Medium High Importance, Medium Low Importance, Low Importance, and Not Important. <p>This data validated an assumption that many on the product team had - the most complex forms are also the most used forms in the system. In fact, the top three importance categories accounted for the vast majority of form opens in AX 2012: <div align="center"> <table cellspacing="0" cellpadding="2" width="481" align="center" border="0"> <tbody> <tr> <td valign="top" width="182"> <p align="center"><strong>Importance / Risk Category</strong></p></td> <td valign="top" width="129"> <p align="center"><strong>% of Total Forms in the Product</strong></p></td> <td valign="top" width="168"> <p align="center"><strong>% of Total Form Opens in AX 2012</strong></p></td></tr> <tr> <td valign="top" width="182">Most Important</td> <td valign="top" width="129"> <p align="center">1%</p></td> <td valign="top" width="168"> <p align="center">37%</p></td></tr> <tr> <td valign="top" width="182">High Importance</td> <td valign="top" width="129"> <p align="center">2.5%</p></td> <td valign="top" width="168"> <p align="center">22%</p></td></tr> <tr> <td valign="top" width="182">Medium High Importance</td> <td valign="top" width="129"> <p align="center">15%</p></td> <td valign="top" width="168"> <p align="center">37%</p></td></tr></tbody></table></div> <p>&nbsp; <p>Our prioritization activity became quite clear and measurable - focus on providing regression coverage starting with the most important forms.&nbsp; Just covering the top 1% was a huge step forward in providing regression coverage. <p>The last thing I'll mention is how we built some analytics to visualize the coverage of the forms. The Power BI (wicked cool, by the way) scatter chart below pulls complexity (Y-axis), AX 2012 usage (X-axis), and number of form opens in our regression tests (size of the bubble) together into one view. The most important forms for regression coverage are on the upper right of the chart. Those forms should also have the largest bubbles since they deserve the most test coverage. While this screen shot is limited to the Most Important forms, you can see that we generally followed the prioritization described in this post - build the most tests for the highest risk forms. <p>&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image0018.png"><img title="clip_image001" style="border-top: 0px;border-right: 0px;border-bottom: 0px;float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;border-left: 0px;padding-right: 0px;margin-right: auto" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/04/clip_image001_thumb6.png" width="817" height="428"></a>]]></content:encoded>
    </item>
    <item>
      <title>Testing is infinite</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/testing-is-infinite</link>
      <pubDate>Fri, 25 Mar 2016 18:36:58 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1083</guid>
      <description><![CDATA[One of my favorite test quotes comes from a former peer of mine - "development is finite but testing...]]></description>
      <content:encoded><![CDATA[<p>One of my favorite test quotes comes from a former peer of mine - "development is finite but testing is infinite". He used that statement to reinforce the challenge of the software test function and the need to constantly be looking at the ROI (return on investment) of testing activities. There's always something more to test. <p>Short of hiring Buzz Lightyear ("to infinity… and beyond!") as a software tester, we need to figure out how to prioritize various testing activities. As noted above, ROI needs to guide the way but that isn't an easy thing to measure. <p>For me, the first step in test prioritization is assessing product risk. The definition of risk that I use is the following (for a detailed example, go to <a href="https://technet.microsoft.com/en-us/library/cc535373.aspx">https://technet.microsoft.com/en-us/library/cc535373.aspx</a>): <ul> <li>Risk exposure = (probability of the risk event happening) X (impact of the risk event) </li></ul> <p>So let's think about this in the context of a prime test activity - creating an automated regression test (see <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/">Automated Regression Test Qualities</a> for more information). Here's how I think about prioritizing regression tests for a particular software artifact based on risk: <ul> <li>Probability = the likelihood of a regression happening in this artifact. Some key inputs to assessing probability include churn, complexity, and existing regression coverage of the artifact. <li>Impact = the estimated cost of the regression should it happen. Some key inputs to assessing impact include the severity of a bug resulting from the regression (security, data damaging, etc), the relative use of the artifact, and the customer perception. For example, an issue on the welcome screen of the product may not be severe, but the impact may still be high if the screen comes up often and the issue results in a perception of low quality by the customer.</li></ul> <p>So Regression Exposure = (likelihood of regression) X (impact of regression). While measuring these inputs absolutely is difficult, getting a relative comparison is something that you can work through. <p>Note that this will provide the return aspect of ROI. Since some tests are easier to create and maintain than others (see <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/03/09/test-automation-pyramid/">Test Automation Pyramid</a>), determining the effort to create the regression test must also be considered for the investment portion of the ROI assessment. <p>This approach can be applied to other testing activities as well. Great testers are constantly thinking about the risk they are mitigating and the ROI of their activities. In my next post, I will walk through how we applied the regression risk approach to prioritize form based tests during AX'7' development. </p>]]></content:encoded>
    </item>
    <item>
      <title>Test Automation Pyramid</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/test-automation-pyramid</link>
      <pubDate>Wed, 09 Mar 2016 15:01:09 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/?p=1073</guid>
      <description><![CDATA[Continuing the discussion on automated regression tests, this post will focus on the test...]]></description>
      <content:encoded><![CDATA[<p>Continuing the discussion on automated regression tests, this post will focus on the test granularities that will lead to a test suite that meets the qualities discussed in my <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/">last post</a>.</p> <p>Test granularity refers to the scope of the test, or how much of the system under test (SUT) that the test covers. There are a variety of terms used for the granularity, typically starting with 'unit' for tests that are narrow in scope. At the other extreme, tests that are broad in scope are typically called 'integration', 'scenario', or 'end to end (E2E)'.</p> <p>The test pyramid is a simple visualization of the suite make-up using different granularities. Do an image web search for 'test pyramid' and you'll got lots of examples of them. For Dynamics AX'7', here's the test pyramid that we used:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/03/image97.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;border-top-width: 0px;margin-right: auto" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/03/image_thumb75.png" width="347" height="211"></a></p> <p>The test suite's base needs to be a large volume of unit and component tests. This is important because these tests are better across the board with respect to the test qualities that I discussed in <a href="https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/">the last blog post</a>: reliable, maintainable, fast, simple, and precise. Hopefully this should be self-evident, but for a much longer discussion on this topic I suggest you take a look at <a href="https://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html">https://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html</a>.</p> <p>The pyramid also indicates that having some broader integration or business cycle tests is important. Even though these tests are more costly, they are very good for building confidence in the product. They are less useful than granular tests when they fail, however. They are typically less reliable so they could be failing for a reason other than a product issue. If it is a product issue, the issue can be challenging to isolate.</p> <p>The next question you might have may be about the ideal ratio between the different tiers of tests. That's a good question and the answer depends on the context of your product, but the starting point that I use is an order of magnitude difference between each tier. For example, having 1,000 unit tests, 100 component tests, 10 integration tests, and 1 business cycle test would be reasonable. We ended up with roughly this distribution for the test suite in AX'7'.</p> <p>While this all looks good in theory, my experience with the last two major releases of AX provides great evidence that this approach works. For AX 2012, our pyramid looked more like an hourglass. We had a lot of unit tests and an almost equal number of integration tests. The integration tests mostly worked through the user interface and the tests were relatively slow, unreliable, and very costly from a maintenance standpoint. Their feedback value was significantly diminished because the failure rates for non-product reasons was high.</p> <p>For AX'7', we have some new testability features (future post fodder!) and, as mentioned above, our suite follows the pyramid. The test suite runs at least an order of magnitude faster and our pass rate is consistently above 99.5%. Maintenance cost is significantly less and feedback value is significantly higher. We've also moved a large number of the tests further upstream in our development process to catch product and test issues earlier.</p>]]></content:encoded>
    </item>
    <item>
      <title>Automated Regression Test Qualities</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/automated-regression-test-qualities</link>
      <pubDate>Thu, 18 Feb 2016 07:35:37 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/2016/02/18/automated-regression-test-qualities/</guid>
      <description><![CDATA[&#160;  In my last post, I discussed the need for a balanced approach to testing efforts. The goal,...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>In my <a href="https://blogs.msdn.com/b/dave_froslie/archive/2016/02/03/achieving-balance-in-testing-software.aspx">last post</a>, I discussed the need for a balanced approach to testing efforts. The goal, informed by the context of the project, is to consider all four quadrants of the agile testing matrix.</p>  <p>In this post, I'm going to turn my focus to a testing activity that is typically found on the Support Engineering half of the matrix - automated regression testing. First, let me describe what I mean by 'automated regression' testing as these are terms that can be overloaded in the software test world.</p>  <blockquote>   <p>Automated - an 'automated' test is one where the system under test is exercised by a computer and not by a human. It does not mean &quot;have the computer use the system under test like a human would use it&quot;. It is this second inference that drives some software test industry leaders to never use the term ‘automated’ or ‘automation’ and prefer something more like 'computer assisted testing'.</p>    <p>Regression - a regression happens when something that used to work no longer works. In the software world, this typically happens when a change is introduced - either directly by an engineer or by an change in a dependency.</p>    <p>Putting these together, automated regression testing involves a computer exercising the system under test to identify and/or prevent changes in the software that cause it to no longer work as it did before.</p> </blockquote>  <p>When creating the set of automated regression tests, the goal is find the most effective test design that will support the engineering effort. Software test teams sometimes will try to serve too many needs with their 'automation' efforts by using it as their primary bug finding activity. While bugs will be found while developing automated tests, there are far more efficient ways to find important bugs that customers care about. I expect to cover exploratory testing in a future post.</p>  <p>Defining desirable qualities in an automated regression test helps us to achieve an effective test design. The following graphic is one that we're referred to frequently during the Dynamics AX'7' project:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/0825.image_0C49C299.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/0825.image_5F00_0C49C299.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/3806.image_thumb_0A0FCA8E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/3806.image_5F00_thumb_5F00_0A0FCA8E.png" width="573" height="207" /></a></p>  <p>While these qualities seem fairly obvious, they are deceptively difficult to achieve in practice. In my next post, I will address different test granularities that will lead to an automated regression suite with these qualities.&#160;&#160; </p>]]></content:encoded>
    </item>
    <item>
      <title>Achieving balance in testing software</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/achieving-balance-in-testing-software</link>
      <pubDate>Wed, 03 Feb 2016 13:25:22 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/2016/02/03/achieving-balance-in-testing-software/</guid>
      <description><![CDATA[Like nearly all things in life, testing software requires a balancing act. There are many different...]]></description>
      <content:encoded><![CDATA[<p>Like nearly all things in life, testing software requires a balancing act. There are many different aspects of a software package that need to be validated. There are many different tools and approaches to do this validation. Spend too much time on any one part of the product or with a single tool or approach and you may have a major gaps in your results.</p>  <p>A question that I occasionally use with college students is a scenario where they have two hours to test the Windows calculator on their first morning on the job. They have access to any information that they want, but they must provide a recommendation to their new manager at the end of the two hours.</p>  <p>Most candidates do a good job of taking a structured approach to functionally testing the calculator, moving from basic functions to advanced functions to error conditions. What very few recognize is the need to think about performance, usability, localization, help, being a good citizen in the OS, etc etc. Even a fairly simple application requires different approaches to do a thorough validation job. </p>  <p>A tool that I've found helpful to explain this to others internally throughout the development life of AX'7' is a variation of Brian Marick's testing matrix. Please see <a href="https://www.exampler.com/old-blog/2003/08/21/#agile-testing-project-1">https://www.exampler.com/old-blog/2003/08/21/#agile-testing-project-1</a> for the original post from Brian. My version with some different types of tests layered into the matrix is below.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/7317.clip_image001_5BF75EDA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/7317.clip_5F00_image001_5F00_5BF75EDA.png"><img title="clip_image001" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/8233.clip_image001_thumb_3B701F28.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/8233.clip_5F00_image001_5F00_thumb_5F00_3B701F28.png" width="444" height="325" /></a></p>  <p>An effective testing program will have activities in all four quadrants. You can visualize emphasizing a particular aspect by moving the vertical middle line to the left or right. Move it to the left to make the Critique Product quadrants larger and you take on regression risk as the engineering team makes changes. Move it to the right and you don't have confidence that the product actually solves the customer needs, even if you have really good engineering support. I've been in projects that have made both of these mistakes. Moving the horizontal middle line up or down results in different project risks, but risks nonetheless.</p>  <p>The matrix can also help you realize that the same tool / approach can't be all things for the project. For example, the tendency for many software professionals is to believe that the same scenario oriented tests that we use to manually Critique Product are the best tests to automate to Support Engineering. While these tests can give you confidence in the product, they are expensive to automate and maintain, slow to run, and are imprecise (it's difficult to pinpoint the cause of a failure). A regression suite is far more effective when primarily made up of component and unit tests. In future posts, I will talk more about test automation qualities and regression suite make up.</p>  <p>If an interview candidate were to draw Marick's testing matrix and describe to me how he/she would approach testing the Windows calculator, that candidate's chances of getting hired would be very good!! </p>]]></content:encoded>
    </item>
    <item>
      <title>(Re)Introduction</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/reintroduction</link>
      <pubDate>Fri, 22 Jan 2016 08:40:00 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/2016/01/22/reintroduction/</guid>
      <description><![CDATA[I wrote my first post on this blog over 10 years ago. I've written over 100 posts, including 9 '4+...]]></description>
      <content:encoded><![CDATA[<p>I wrote my first post on this blog over 10 years ago. I've written over 100 posts, including 9 '4+ Star Ratings' posts (whatever that means). Why do I need to write a post titled (Re)Introduction?</p>  <p>Well, a bit of a deeper dive into my blogging history shows that I wrote a bunch of posts in 2005 and 2006, between 3 and 8 posts per year from 2007 to 2012, and a big fat zero for 2013. And 2014. And 2015. And now it's 2016… over 10 years since I started blogging and about time to start doing some writing again.</p>  <p>Let's get the (re)introduction part of this post out of the way. There are definitely some constants from 2005. I still work for Microsoft at the Fargo campus. I still work on the Dynamics product line, specifically Dynamics AX which I've worked on for several years now. Fargo is still in the prairie, so the blog title still works.</p>  <p>But there are changes as well. My beard has more gray hair to start with. My elementary school daughter is in college. My, how the time flies…. but I digress. I've played several different roles in my 14 years at MSFT - dev lead, dev manager, test manager, test architect, and engineering manager. I've worked both on the foundation side of AX (the kernel, development tools, client, etc) and in the past four years on the application side (the modules like human resources and the various financial modules). While I've been personally changing roles, the software industry and Microsoft have also been making significant changes. Lots of change.</p>  <p>The trigger for recharging this blog is having something to write about, of course. That means that I a) am passionate about sharing the content, b) feel that it will be useful to a Dynamics focused audience, and c) able to share it.</p>  <p>All three of these things are coming together in my current role which I've dubbed 'test architect v2'.&#160; How we think about quality in a &quot;cloud first world mobile first world with unified engineering&quot; has changed - most of it for the better. I'll be writing about how it has changed internally and provide thoughts on how it could and should impact the Dynamics AX ecosystem. Hopefully that will be useful to you. Finally, I'll be able to share more about the new version of Dynamics AX over the coming months.</p>]]></content:encoded>
    </item>
    <item>
      <title>Why do my Coded UI tests pause during playback?</title>
      <link>https://docs.microsoft.com/archive/blogs/dave_froslie/why-do-my-coded-ui-tests-pause-during-playback</link>
      <pubDate>Fri, 10 Aug 2012 12:48:32 GMT</pubDate>
      <dc:creator><![CDATA[David Froslie]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dave_froslie/2012/08/10/why-do-my-coded-ui-tests-pause-during-playback/</guid>
      <description><![CDATA[&#160;  If you’ve spent some time using VS 2010 Coded UI with Dynamics AX 2012 you’ve probably...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="2">If you’ve spent some time using VS 2010 Coded UI with Dynamics AX 2012 you’ve probably noticed that playback can be slow.&#160; Watching the playback, you will see that there will be some activity, then a pause, then some more activity, more pausing, a little more playback, more pausing, &lt;sigh&gt;.&#160; It makes you wonder.. what is it that the playback tool has to think so hard about that it has to pause?</font></p>  <p><font size="2">It turns out the playback tool is not thinking.&#160; Instead, it’s looking around – looking around for the window that it needs to do its next operation on.&#160; It takes so long to find the window because of the uniqueness of Dynamics AX window titles and how Coded UI looks for windows.&#160; </font></p>  <p><font size="2">When you do a recording with Coded UI, the recorder identifies certain search properties that are used to find the UI element on playback.&#160; For top level windows, the primary search property is the title of the window.&#160; Let me explain using an example.</font></p>  <p><font size="2">Let’s say I’m recording a script to create a new sales order.&#160; The Sales Order form has a title that looks like the following:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/4760.image_485E901D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/4760.image_5F00_485E901D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 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/00/44/80/metablogapi/1512.image_thumb_7EEC3B61.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/1512.image_5F00_thumb_5F00_7EEC3B61.png" width="357" height="73" /></a></p>  <p><font size="2">After you complete the recording and generate code, go back and open the UIMap.uitest element in the Solution Explorer in VS.&#160; In the UI Control Map, right click on the top level node that represent this form (UISalesorder1ceuSalesoWindow was the name in my example).&#160; Select Properties in the pop-up menu.&#160; Then go to Search Properties in the Properties pane and click on the […] button.&#160; A screen shot of what I just described is shown below.</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/3113.image_47567A73.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/3113.image_5F00_47567A73.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 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/00/44/80/metablogapi/2251.image_thumb_6B8B3928.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/2251.image_5F00_thumb_5F00_6B8B3928.png" width="647" height="619" /></a></p>    <p><font size="2">After you click on […], an Edit Search Properties form will come up.&#160; In it you will see one of the search properties is:</font></p>  <blockquote>   <p><font size="2">Name EqualsTo “Sales order‬ (‎‪1‬ - ‎‪ceu‬)‎‪ - ‎‪‪‪Sales order‬: ‎‪SO-101375‬‬, ‎‪‪Forest Wholesales”</font></p> </blockquote>  <p><font size="2">If I play this back, it takes over 30 seconds.&#160; In fact, it takes about 25 seconds to do the first operation on the Sales Order form.&#160; Too slow!</font></p>  <p><font size="2">But here’s the deal, if I look at the Sales Order form title, I see that it has a different title than the one that I recorded and that the Coded UI playback engine is looking for.&#160; The ID has incremented by one so that the title now is:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/44/80/metablogapi/3005.image_5E04DA88.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/3005.image_5F00_5E04DA88.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 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/00/44/80/metablogapi/3301.image_thumb_63DF7E21.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-80-metablogapi/3301.image_5F00_thumb_5F00_63DF7E21.png" width="390" height="78" /></a></p>  <p align="left"><font size="2">It’s surprising that the form is found at all given our Search Properties.&#160; It does find it because the playback engine’s Smart Match capability kicks in.&#160; What the engine is doing is first looking for a window with the exact match.&#160; It looks through all windows currently displayed.&#160; Then it waits.&#160; And looks some more.&#160; After all, it might take some time for the window to be displayed so the playback engine doesn’t want to be in a hurry.&#160; So it waits for a little while longer and then looks some more.&#160; Eventually, it gives up on finding a window that is an exact match.&#160; That’s when the Smart Match algorithm kicks and and it looks for windows with titles that are similar.&#160; Smart Match can pretty quickly figure out that this new window has a title that is almost the same as the other one and decides it’s the one to operate on.&#160; And off it goes.</font></p>  <p align="left"><font size="2">So it’s cool that it works, but waiting for 20+ seconds for the exact match phase to timeout is tedious.&#160; Fortunately there’s a way around this.&#160; If you go back to the Search Properties window described above, you can change the properties.&#160; In this case. I’m going to change </font></p>  <blockquote>   <p align="left"><font size="2">Name EqualsTo “Sales order‬ (‎‪1‬ - ‎‪ceu‬)‎‪ - ‎‪‪‪Sales order‬: ‎‪SO-101375‬‬, ‎‪‪Forest Wholesales”</font></p> </blockquote>  <p align="left"><font size="2">to</font></p>  <blockquote>   <p align="left"><font size="2">Name Contains “Sales order‬ (‎‪1‬ - ‎‪ceu‬)‎‪ - ‎‪‪‪Sales order‬: ‎‪SO”</font></p> </blockquote>  <p align="left"><font size="2">Now my playback was complete in around 8 seconds instead of over 30 seconds!</font></p>  <p align="left"><font size="2">To summarize, minimize the pauses in your Coded UI playback with Dynamics AX 2012 by changing the window name search property from an EqualsTo statement to a Contains statement.&#160; This speeds up the playback engine’s search significantly, and speeds up your development and test execution process!</font></p>]]></content:encoded>
    </item>
  </channel>
</rss>