<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Coding the Architecture - testing tag</title>
  <link>http://www.codingthearchitecture.com/tags/testing/</link>
  <description>Software architecture for developers</description>
  <language>en</language>
  <copyright>Coding the Architecture</copyright>
  <lastBuildDate>Mon, 21 May 2012 09:41:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Using new technology will make it faster</title>
    <link>http://www.codingthearchitecture.com/2009/05/15/using_new_technology_will_make_it_faster.html</link>
    
      
        <description>
          &lt;p&gt;
I heard an interesting throwaway comment recently that I thought I&#039;d share. To paraphrase...
&lt;/p&gt;

&lt;blockquote&gt;
The system is being rewritten with new technology, so it won&#039;t be slower than what we have now.
&lt;/blockquote&gt;

&lt;p&gt;
While it&#039;s true that new and updated technology *can* improve performance, it&#039;s also very easy to misuse that technology and come up with something that performs perceivably slower. I&#039;ve seen this a few times, predominantly where simple websites have been rewritten using new technologies. One of the biggest contributing factors is that new technologies often provider &#034;better&#034; and more complex ways to solve the same problem. For example, it&#039;s easy to see how a simple two-tier web application could be rewritten with a web-MVC framework and a distributed middle-tier added to make the architecture more fashionably SOA-like. Here, the added complexity could result in net performance gains or losses, depending on how the technology is applied through the design and architecture.
&lt;/p&gt;

&lt;p&gt;
There&#039;s nothing wrong with refreshing a software (or hardware) system with new technology, but it&#039;s naive to assume that performance won&#039;t degrade. New technology generally brings added complexity, and this complexity introduces more things that can go wrong. Any software/hardware architecture should undergo *some* non-functional testing before it goes live, and this still holds true for systems that are being rewritten as part of a technology refresh strategy. Don&#039;t assume anything ... &lt;a href=&#034;http://www.codingthearchitecture.com/pages/book/role.html#architectureEvaluation&#034;&gt;test it&lt;/a&gt;.
        </description>
      
      
    
    
    
    <category>How do you define software architecture?</category>
    
    <comments>http://www.codingthearchitecture.com/2009/05/15/using_new_technology_will_make_it_faster.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2009/05/15/using_new_technology_will_make_it_faster.html</guid>
    <pubDate>Fri, 15 May 2009 10:57:11 GMT</pubDate>
  </item>
  
  <item>
    <title>London User Group - October 2008</title>
    <link>http://www.codingthearchitecture.com/2008/10/14/london_user_group_october_2008.html</link>
    
      
        <description>
          &lt;p&gt;
Here are the details of the October &lt;a href=&#034;http://www.codingthearchitecture.com/pages/londonusergroup.html&#034;&gt;London User Group&lt;/a&gt;.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Title&lt;/b&gt; : Testing as an Architectual Concern&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Summary&lt;/b&gt; : In this session, &lt;a href=&#034;http://www.codingthearchitecture.com/authors/kseal/&#034;&gt;Kevin Seal&lt;/a&gt; will present some recent experiences of testing a JavaEE project and how coverage was a double-edged sword, unit testing a blessing and a curse, and a pragmatic mix of test approaches was eventually invaluable in refining the architecture and development process.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Date&lt;/b&gt; : Wednesday, 29th October 2008&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Time&lt;/b&gt; : 18:30-20:00&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Location&lt;/b&gt; : Skills Matter, &lt;a href=&#034;http://maps.google.co.uk/maps?f=q&amp;hl=en&amp;q=1+Sekforde+Street+London&amp;sll=53.098145,-2.443696&amp;sspn=11.997343,29.619141&amp;ie=UTF8&amp;ll=51.523271,-0.104671&amp;spn=0.006061,0.014462&amp;z=16&amp;om=1&#034;&gt;1 Sekforde Street&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Format&lt;/b&gt; : Presentation and discussion, with further discussion in a local pub (The Crown).&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Cost&lt;/b&gt; : Free, but &lt;a href=&#034;http://skillsmatter.com/event/java-jee/&#034;&gt;registration is required&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p align=&#034;center&#034;&gt;
&lt;a href=&#034;http://www.skillsmatter.com&#034;&gt;&lt;img src=&#034;http://www.codingthearchitecture.com/images/skillsmatter.gif&#034; alt=&#034;Skills Matter&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;
&lt;br/&gt;
Many thanks to Skills Matter for sponsoring the user group. 
&lt;/p&gt;

        </description>
      
      
    
    
    
    <comments>http://www.codingthearchitecture.com/2008/10/14/london_user_group_october_2008.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2008/10/14/london_user_group_october_2008.html</guid>
    <pubDate>Tue, 14 Oct 2008 13:55:18 GMT</pubDate>
  </item>
  
  <item>
    <title>Testing Times</title>
    <link>http://www.codingthearchitecture.com/2008/09/26/testing_times.html</link>
    
      
      
        <description>
          &lt;p&gt;
Having recently taken &lt;a href=&#034;http://www.sealisland.net/2008/09/pursuit-of-coverage.html&#034;&gt;another look&lt;/a&gt; at my project&#039;s unit testing strategy I thought I&#039;d share some of my thoughts on how I see unit testing as just another force on the system&#039;s design. As such it needs to be weighed in the balance with the other forces.
&lt;/p&gt;
&lt;p&gt;
Unfortunately it&#039;s a force that tends to get more influence than it perhaps deserves, not least because it&#039;s a force typically backed by the development team.
&lt;/p&gt;&lt;p&gt;&lt;a href=&#034;http://www.codingthearchitecture.com/2008/09/26/testing_times.html&#034;&gt;Read more...&lt;/a&gt;&lt;/p&gt;
        </description>
      
    
    
    
    <category>How do you deliver software architecture?</category>
    
    <comments>http://www.codingthearchitecture.com/2008/09/26/testing_times.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2008/09/26/testing_times.html</guid>
    <pubDate>Fri, 26 Sep 2008 13:09:00 GMT</pubDate>
  </item>
  
  <item>
    <title>Who should own the non-functional tests?</title>
    <link>http://www.codingthearchitecture.com/2008/07/07/who_should_own_the_non_functional_tests.html</link>
    
      
        <description>
          &lt;p&gt;
This is a follow-up to a post entitled &lt;a href=&#034;http://www.codingthearchitecture.com/2007/11/05/performance_tuning_java_systems.html&#034;&gt;Performance tuning Java systems&lt;/a&gt; that I made last year, which talked about some performance testing that I was doing for a customer. Last week, I went back to the same customer to make some small tweaks to the test scripts, and this very simple act highlighted something I thought was very interesting.
&lt;/p&gt;

&lt;p&gt;
The key thing about the system being tested is that it&#039;s a customized version of an existing vendor product (a high volume, low latency trading platform), with the vendor being responsible for making all of the changes. At some point last year, my customer wanted to run some tests to ensure that the platform could grow with their business, and that&#039;s where I got involved. After a round of testing, environment reconfiguration and patches, the system more or less delivered on what it promised.
&lt;/p&gt;

&lt;p&gt;
Fast-forward to the current day and I was bought back in to make some changes to the test scripts, because the vendor had made some changes to their web application. Since our performance tests were JMeter based, those changes had a knock-on effect on the tests. The thing I found interesting is that the performance test pack hadn&#039;t been handed over to the vendor. Regardless of the reasons, the benefits of doing this are fairly clear.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Ownership&lt;/b&gt; : although it&#039;s good that my customer wanted to proactively test some of the non-functional aspects of the software, I can&#039;t help feeling that the software vendor should have ownership of the test pack. My understanding is that they do little in the way of non-functional testing themselves, so this is an ideal opportunity to rectify this.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Continuous execution&lt;/b&gt; : if the vendor has ownership, they can include the test pack as a part of their integration/build/release process for continuous execution and early warning of performance degrading changes.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Accuracy&lt;/b&gt; : I like to think that we did a good job at putting together the performance testing scripts, but we don&#039;t have the inside knowledge of the system that the vendor has. Vendor ownership would ensure that the test scripts are as accurate and representative as possible.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Up to date&lt;/b&gt; : the test scripts are inherently tied to the AJAX web application, which means that they need to be kept in sync when changes are made to the user experience. Again, the vendor is best positioned to do this, and taking a more proactive approach would ensure that user experience changes don&#039;t degrade the non-functional characteristics of the software.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The overriding question here is why doesn&#039;t the vendor undertake their own performance testing? They *should* take responsibility for the non-functional characteristics of their software, particularly when they are making claims of how fast and scalable it is. But perhaps more interesting is that the vendor of another product in use in the same space also doesn&#039;t do performance testing. Shouldn&#039;t we be asking more from commercial product vendors?
&lt;/p&gt;
        </description>
      
      
    
    
    
    <category>How do you deliver software architecture?</category>
    
    <comments>http://www.codingthearchitecture.com/2008/07/07/who_should_own_the_non_functional_tests.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2008/07/07/who_should_own_the_non_functional_tests.html</guid>
    <pubDate>Mon, 07 Jul 2008 10:03:00 GMT</pubDate>
  </item>
  
  <item>
    <title>What is Significant?</title>
    <link>http://www.codingthearchitecture.com/2007/12/15/what_is_significant.html</link>
    
      
        <description>
          &lt;p&gt;
Recently I wrote a quick blog about taking metrics for optimisation. I suggested they should only be included if the improvement was significant, but how do you define significant?
&lt;/p&gt;

&lt;p&gt;
You may think that &#039;significant&#039; is just a matter of opinion but it actually has a very specific meaning in statistics - 

&lt;a href=&#034;http://en.wikipedia.org/wiki/Statistical_significance&#034;&gt;Wikipedia &#039;s Description&lt;/a&gt;. You can have a read through the maths but it basically comes down to &#034;a result is called statistically significant if it is unlikely to have occurred by chance&#034;.
&lt;/p&gt;

&lt;p&gt;
This is really important and something that performance testers and optimisers often forget. For example...
&lt;/p&gt;
&lt;p&gt;
Imagine that you perform some kind of performance test on your system or code. This could be anything e.g. latency response timings, throughput per time unit etc but we&#039;ll assume for this that it&#039;s units processed in 10 minutes. The figure you get is  20. You spend a day modifying a piece of code you think will affect the performance, retest and get 22. A 10% improvement - pretty good.
&lt;/p&gt;
&lt;p&gt;
You hand the new code over to a colleague who also does a test. She says that it&#039;s worse by 5%. Slander! You take it to your boss who says there is no difference...
&lt;/p&gt;
&lt;p&gt;
What we&#039;ve done is perform three tests on the old and new system. Lets list them and perform seven others as well:
&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
Old: 20 20 22 19 19 21 19 19 19 22
New: 22	19 22 20 20 19 19 19 21 19
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Now it&#039;s obvious what happened (although it probably was before). Your test does not produce constant figures even without changes. Both have a range of 3 (19-22), an average of 20 and a variance of 1.55
&lt;/p&gt;
&lt;p&gt;
If you had performed ten runs on the original code first you would have realised that a single result of 22 for the new code is not significant as it&#039;s within the range of the previous figures.
&lt;/p&gt;
&lt;p&gt;
Performing the test multiple times on the new code would increase your confidence that it&#039;s a significant change. You can test this statistically (but the maths is beyond the scope of this blog entry).
&lt;/p&gt;
&lt;p&gt;
Just to leave you with a challenge, the project I&#039;m currently working has a task that we wish to optimise but it takes ten hours to run even on a grid of several hundreds machines. How do we run realistic, pre-production tests that we know are statistically significant?
&lt;/p&gt;

        </description>
      
      
    
    
    
    <category>How do you deliver software architecture?</category>
    
    <comments>http://www.codingthearchitecture.com/2007/12/15/what_is_significant.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2007/12/15/what_is_significant.html</guid>
    <pubDate>Sat, 15 Dec 2007 21:15:27 GMT</pubDate>
  </item>
  
  <item>
    <title>Performance tuning Java systems</title>
    <link>http://www.codingthearchitecture.com/2007/11/05/performance_tuning_java_systems.html</link>
    
      
        <description>
          &lt;p&gt;
One of my current projects involves me performance testing a third party Java system. In essence, it&#039;s a distributed/n-tier Java EE web application and we&#039;re hitting it with a high simulated load thanks to Apache JMeter. One of the things we found is that performance degraded quite dramatically as load increased, to the point where some requests could take anywhere up to a minute or two to be serviced. By plotting the raw results and calculating (for example) the 95% percentile, we were able to see that only a very small number of the requests suffered in this way.
&lt;/p&gt;

&lt;p&gt;
After some investigation, the suspected cause of these high response times was &#034;stop the world&#034; garbage collection and we eventually proved this by monitoring the JVM during a test run. Thankfully, the new Java VMs include a ton of tuning options and I&#039;ve found the following references particularly useful in the past.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#034;http://java.sun.com/docs/hotspot/gc5.0/ergo5.html&#034;&gt;Ergonomics in the 5.0 Java Virtual Machine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#034;http://java.sun.com/performance/reference/whitepapers/5.0_performance.html&#034;&gt;J2SE 5.0 Performance White Paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#034;http://java.sun.com/javase/technologies/hotspot/index.jsp&#034;&gt;Java SE HotSpot at a Glance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
So then, some advice :
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure that you define your &lt;a href=&#034;http://www.codingthearchitecture.com/tags/nonfunctionalrequirements&#034;&gt;non-functional requirements&lt;/a&gt; as early in the project as you can, specifying performance in the context of scalability. Once you&#039;ve done this, you can focus on figuring out &lt;a href=&#034;http://www.codingthearchitecture.com/2007/10/02/separating_the_non_functionals.html&#034;&gt;how to meet them&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Make sure that you test your key non-functional requirements as soon as possible, preferably with something like a &lt;a href=&#034;http://www.codingthearchitecture.com/2007/10/10/reference_architectures.html&#034;&gt;reference architecture&lt;/a&gt;. Tuning your JVMs early lets you gauge how much more performance you might get with further tuning in the future.&lt;/li&gt;
&lt;li&gt;Make sure that you document your JVM settings if you&#039;ve had to tune them to meet your performance targets. The system I&#039;m testing is a third party product and there&#039;s no way that the customer should even be running, what&#039;s basically a &#034;real-time&#034; system, on untuned JVMs.&lt;/li&gt;
&lt;li&gt;If you need to start investigating performance problems, this article over at InfoQ (&lt;a href=&#034;http://www.infoq.com/articles/the-box&#034;&gt;The Box: A Shortcut to finding Performance Bottlenecks&lt;/a&gt;) has some good tips for starting out on this route.&lt;/li&gt;
&lt;li&gt;Ensure that your Java system is easy to monitor, using something like JMX, because this will really help you prove and diagnose any issues you might come across. More on that later in the week.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
If you get the opportunity to do some performance testing then I highly recommend it. Assuring the non-functional requirements is a key part of an architect&#039;s role so it&#039;s great experience.
&lt;/p&gt;
        </description>
      
      
    
    
    
    <category>How do you deliver software architecture?</category>
    
    <comments>http://www.codingthearchitecture.com/2007/11/05/performance_tuning_java_systems.html#comments</comments>
    <guid isPermaLink="true">http://www.codingthearchitecture.com/2007/11/05/performance_tuning_java_systems.html</guid>
    <pubDate>Mon, 05 Nov 2007 12:23:34 GMT</pubDate>
  </item>
  
  </channel>
</rss>

