<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adarsh's blog : Software Testing</title><link>http://blogs.msdn.com/adarshk/archive/tags/Software+Testing/default.aspx</link><description>Tags: Software Testing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>"Test driven development" - some practical experiences in API development</title><link>http://blogs.msdn.com/adarshk/archive/2007/03/05/test-driven-development-methodology-some-practical-experiences-in-api-development.aspx</link><pubDate>Tue, 06 Mar 2007 05:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1814176</guid><dc:creator>adarshk</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/adarshk/comments/1814176.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adarshk/commentrss.aspx?PostID=1814176</wfw:commentRss><description>&lt;P&gt;Since last few years I was reading&amp;nbsp;a lot of discussion about "extreme programing" &amp;nbsp;and "test driven development". I decided to explore and apply some of those principles in my own development and within my team. Here are some of the interesting things I would like to share. These experiences are&amp;nbsp;based on a project for developing a public SDK.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Approach:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;First thing I&amp;nbsp;really did &lt;STRONG&gt;not&lt;/STRONG&gt; try the hardcore methodology of&amp;nbsp;test driven development. I took&amp;nbsp;a little relaxed approach with relaxed restrictions.&lt;/P&gt;
&lt;P&gt;My approach&amp;nbsp;contains&amp;nbsp;following category of pro-active and reactive actions.&lt;/P&gt;
&lt;P&gt;a) Pro-active action was applied on&amp;nbsp;all new functionality, here&amp;nbsp;I did applied the rule that at minimum main line happy&amp;nbsp;scenario code path must&amp;nbsp;be included as&amp;nbsp;an automated unit test and most common failure code path should&amp;nbsp;be covered,&lt;/P&gt;
&lt;P&gt;b) Second action is&amp;nbsp;reactive approach, here when our test team reported any issue. Fix must&amp;nbsp;include unit test and should also try to cover other related scenario.&lt;/P&gt;
&lt;P&gt;In some sense this looks very relaxed compare to hardcore "test driven development" approach, but I found it&amp;nbsp;is&amp;nbsp;easy for adoption within the team and still contains lots of benefit&amp;nbsp;in terms of time investments and returns.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Results from this approach:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Overall I was very encouraged with this approaqch and&amp;nbsp;here are some of the fruits I found in applying&amp;nbsp;this approach&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a) Overall quality of regular build is improved with almost no regression in mainline scenarios.&lt;/P&gt;
&lt;P&gt;b) Unit tests included with bug fixes helped to cover more related scenarios in addition to identified bugs.&lt;/P&gt;
&lt;P&gt;c) Test team is more happy; unit test code snippets works as live spec document for them and help them to start testing right away.&lt;/P&gt;
&lt;P&gt;d) Very few complaints from test team about missing or outdated specs.&lt;/P&gt;
&lt;P&gt;e) Test team is very active&amp;nbsp;in&amp;nbsp;finding corner cases, fault injection, stress, perf scenarios and helped to provide better coverage and repro, which definitely improve the overall quality in eraly product cycle.&lt;/P&gt;
&lt;P&gt;e) Writing the unit test for happy line scenario help us to exercise our scenarios as a real&amp;nbsp;API user customer. This&amp;nbsp;helps us&amp;nbsp;to find API naming and usabilty issues even before&amp;nbsp;including&amp;nbsp;the public API in product.&lt;/P&gt;
&lt;P&gt;f) We did keep test code and product code in separate assemblies, this helped to improve overall debuggability of the code.&lt;/P&gt;
&lt;P&gt;Overall I found the approach was very practical and beneficial for us, I will post more details and some quantitative data later.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: #333333; FONT-FAMILY: 'Trebuchet MS'"&gt;&lt;EM&gt;&lt;FONT size=2&gt;This posting is provided "AS IS" with no warranties, and confers no rights&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1814176" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adarshk/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/adarshk/archive/tags/General/default.aspx">General</category></item><item><title>Use NetworkInformation classes to get the list of listening ports on your machine</title><link>http://blogs.msdn.com/adarshk/archive/2005/03/14/395392.aspx</link><pubDate>Mon, 14 Mar 2005 19:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:395392</guid><dc:creator>adarshk</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/adarshk/comments/395392.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adarshk/commentrss.aspx?PostID=395392</wfw:commentRss><description>&lt;p&gt;.Net frameworks 2.0 have new addition of Namespace, System.Net.NetworkInformation, it provide a number of interesting classes to extract the network related statistics and state of the machine, it pretty much provide most of the functionality which is&amp;nbsp;exposed by native IPHelper APIs. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p&gt;Earlier I had shown a simple example for getting network availbility event notification. Here is another simple 4 line example, where your application could check all the listening ports on the machine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;using System.Net;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;using System.Net.NetworkInformation;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;public class Test&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static void &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Main&lt;/st1:place&gt;()&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPGlobalProperties ipGlobal = IPGlobalProperties.GetIPGlobalProperties();&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPEndPoint[] connections = ipGlobal.GetActiveTcpListeners ( ) ;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach(IPEndPoint ipe in connections)&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Listening IPEndPoint = "+ipe.Port);&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=395392" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adarshk/archive/tags/Net+class+library/default.aspx">Net class library</category><category domain="http://blogs.msdn.com/adarshk/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/adarshk/archive/tags/.Net+Frameworks+2.0/default.aspx">.Net Frameworks 2.0</category></item><item><title>Does your application require customizing System.Net.WebPermission, SocketPermission or DnsPermission settings?</title><link>http://blogs.msdn.com/adarshk/archive/2004/12/06/275522.aspx</link><pubDate>Mon, 06 Dec 2004 09:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:275522</guid><dc:creator>adarshk</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/adarshk/comments/275522.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adarshk/commentrss.aspx?PostID=275522</wfw:commentRss><description>&lt;p&gt;.Net frameworks comes with deefault security settings where components running under Intranet, Internet Zone can only have WebPermission to connect back to the&amp;nbsp;server, from where they are downloaded. Also the component from Intranet zone and Internet zone don't have any SocketPermission and DnsPermission by default.&lt;/p&gt; &lt;p&gt;I am trying to find out some real world usage scenarios, where people are customizing these security settings for there application or components in either intranet or internet zone deployment. Special interest is WebPermission, SocketPermission,&amp;nbsp;DnsPermission or NetworkInformationPermission (NetowrkInformationPermission is only in .net frameworks 2.0). &lt;/p&gt; &lt;p&gt;If you are one of them, please drop your comment about scenario and your experience with it.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=275522" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adarshk/archive/tags/Net+class+library/default.aspx">Net class library</category><category domain="http://blogs.msdn.com/adarshk/archive/tags/Software+Testing/default.aspx">Software Testing</category><category domain="http://blogs.msdn.com/adarshk/archive/tags/.Net+Frameworks+2.0/default.aspx">.Net Frameworks 2.0</category></item></channel></rss>