<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Contracts and Integration Tests for Component Interfaces</title>
    <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Contracts and Integration Tests for Component Interfaces</title>
      <description>&lt;p&gt;I am mentoring a team that is transitioning to XP, the first team in a planned, corporate-wide transition. Recently we ran into miscommunication problems about an interface we are providing to another team.&lt;/p&gt;


	&lt;p&gt;The problems didn&amp;#8217;t surface until a &amp;#8220;big-bang&amp;#8221; integration right before a major release, when it was too late to fix the problem. The feature was backed out of the release, as a result.&lt;/p&gt;


	&lt;p&gt;There are several lessons to take away from this experience and a few techniques for preventing these problems in the first place.&lt;/p&gt;


	&lt;p&gt;End-to-end &lt;em&gt;automated&lt;/em&gt; integration tests are a well-established way of catching these problems early on. The team I&amp;#8217;m mentoring has set up its own continuous-integration (CI) server and the team is getting pretty good at writing &lt;em&gt;acceptance&lt;/em&gt; tests using &lt;a href="http://fitnesse.org"&gt;FitNesse&lt;/a&gt;. However, these tests only cover the components provided by the team, not the true end-to-end &lt;em&gt;user stories&lt;/em&gt;. So, they are imperfect as both acceptance tests and integration tests. Our longer-term goal is to automate &lt;em&gt;true&lt;/em&gt; end-to-end acceptance and integration tests, across all components and services.&lt;/p&gt;


	&lt;p&gt;In this particular case, the other team is following a waterfall-style of development, with &lt;em&gt;big design up front&lt;/em&gt;. Therefore, my team needed to give them an interface to design against, before we were ready to actually implement the service.&lt;/p&gt;


	&lt;p&gt;There are a couple of problems with this approach. First, the two teams should really &amp;#8220;pair&amp;#8221; to work out the interface and behavior across their components. As I said, we&amp;#8217;re just starting to go Agile, but my goal is to have &lt;em&gt;virtual&lt;/em&gt; feature teams, where members of the required component teams come together as needed to implement features. This would help prevent the miscommunication of one team defining an interface and sharing it with another team through documentation, &lt;em&gt;etc.&lt;/em&gt;  Getting people to communicate face-to-face and to write code together would minimize miscommunication.&lt;/p&gt;


	&lt;p&gt;Second, defining a service interface without the implementation is risky, because it&amp;#8217;s very likely you will miss important details. The best way to work out the details of the interface is to test drive it in some way.&lt;/p&gt;


	&lt;p&gt;This suggests another technique I want to introduce to the team. When defining an interface for external consumption, don&amp;#8217;t just deliver the &amp;#8220;static&amp;#8221; interface (source files, documentation, &lt;em&gt;etc.&lt;/em&gt;), also deliver working &lt;a href="http://www.mockobjects.com/"&gt;Mock Objects&lt;/a&gt; that the other team can test against. You should develop these mocks as you test drive the interface, even if you aren&amp;#8217;t yet working on the full implementation (for schedule or other reasons).&lt;/p&gt;


	&lt;p&gt;The mocks encapsulate and enforce the behavioral &lt;strong&gt;contract&lt;/strong&gt; of the interface. &lt;a href="http://en.wikipedia.org/wiki/Design_by_contract"&gt;Design by Contract&lt;/a&gt; is a very effective way of thinking about interface design and implementing automated enforcement of it. Test-driven development mostly serves the same practical function, but thinking in &amp;#8220;contractual&amp;#8221; terms brings clarity to tests that is often missing in many of the tests I see.&lt;/p&gt;


	&lt;p&gt;Many developers already use mocks for components that don&amp;#8217;t exist yet and find that the mocks help them design the interfaces to those components, even while the mocks are being used to test clients of the components.&lt;/p&gt;


	&lt;p&gt;Of course, there is no guarantee that the mocks faithfully represent the actual behavior, but they will minimize surprises. Whether you have mocks or not, there is no substitute for running automated integration tests on real components as soon as possible.&lt;/p&gt;</description>
      <pubDate>Sun, 29 Jun 2008 21:54:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b57496fe-d160-42bd-97cc-73608c9333d1</guid>
      <author>Dean Wampler</author>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces</link>
      <category>Dean's Deprecations</category>
      <category>Agile Methods</category>
      <category>Design Principles</category>
      <category>design</category>
      <category>by</category>
      <category>contract</category>
      <category>continuous</category>
      <category>integration</category>
      <category>components</category>
      <category>interfaces</category>
      <category>XP</category>
      <category>agile</category>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Breguet watches</title>
      <description>&lt;p&gt;day before&lt;/p&gt;</description>
      <pubDate>Fri, 23 Dec 2011 21:22:12 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b113ffa0-3fce-4cd0-b346-9a1f870bde2f</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-190985</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Bilf&#246;rs&#228;kringar</title>
      <description>&lt;p&gt;Great share of this article brother.&lt;/p&gt;</description>
      <pubDate>Mon, 31 Oct 2011 19:19:49 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6304c2b0-e2f5-4d5e-a043-1fc67879a677</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-166325</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by wedding dresses</title>
      <description>&lt;p&gt;There are a couple of problems with this approach. But you&amp;#8217;re right.&lt;/p&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:02:20 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b5c739ba-4c4f-42b2-a341-348f7f188ad0</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-159198</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by ferragamo shoes</title>
      <description>&lt;p&gt;&lt;a href="http://www.ferragamoshoessaleusa.org/belts-c-14.html" rel="nofollow"&gt;Ferragmo belt&lt;/a&gt; from &lt;a href="http://www.ferragamoshoessaleusa.org/vara-c-11.html" rel="nofollow"&gt;ferragamo outlet&lt;/a&gt; has top quality with best craftsmanship. Now &lt;a href="http://www.ferragamoshoessaleusa.org/" rel="nofollow"&gt; Salvatore ferragamo sale&lt;/a&gt; belts online with reasonable price and free shipping.&lt;/p&gt;</description>
      <pubDate>Fri, 16 Sep 2011 03:11:12 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:bae26ae7-d896-47bd-8ff4-be4f499d391b</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-141223</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Coach Factory Online</title>
      <description>&lt;p&gt;nice post?&lt;/p&gt;</description>
      <pubDate>Tue, 07 Jun 2011 21:43:11 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f9561a12-de6e-4c94-a637-4e764edec936</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-108886</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by okey oyunu oyna </title>
      <description>&lt;p&gt;interesting article i am glad for it&lt;/p&gt;


	&lt;p&gt;internette g&#246;r&#252;nt&#252;l&#252; olarak &lt;a href="http://www.okeyoyunu-oyna.com" rel="nofollow"&gt;okey oyunu oyna&lt;/a&gt;, ger&#231;ek kisilerle tanis,
 turnuva heyecanini yasa.&lt;/p&gt;</description>
      <pubDate>Wed, 27 Apr 2011 13:36:57 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6fbe67a7-222f-47ae-bd17-c0c02eef65e3</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-91871</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Seobaglyak</title>
      <description>&lt;p&gt;Very interesting. I am glad I came across this&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Tue, 12 Apr 2011 00:00:49 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:34ed8144-06da-4d6d-a368-ad8d659995d5</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-83181</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by iPad Video Converter for Mac</title>
      <description>&lt;p&gt;very useful information for me! I&amp;#8217;ll recommend it to my friends.&lt;/p&gt;</description>
      <pubDate>Wed, 09 Mar 2011 19:38:50 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e11c2c5c-2321-4b96-8a7c-708b4544e58a</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-71242</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Criminal Records</title>
      <description>&lt;p&gt;The mocks encapsulate and enforce the behavioral contract of the interface.&lt;/p&gt;</description>
      <pubDate>Fri, 11 Feb 2011 12:27:46 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:f97e886f-62e7-4e08-8cd7-dfde91a3b4f0</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-62022</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by http://www.blacktowhiteiphone4.com</title>
      <description>&lt;p&gt;Great news! &lt;a href="http://www.blacktowhiteiphone4.com" rel="nofollow"&gt;White iphone 4&lt;/a&gt; Conversion Kit is now avaible! With hottest White color outlook can certainly catch your eyes and heart!&lt;/p&gt;</description>
      <pubDate>Thu, 23 Dec 2010 01:35:06 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7b279aee-808a-4f06-bdfe-78c8173aec0f</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-51270</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by oxpdffr</title>
      <description>&lt;p&gt;&lt;a href="http://www.oxpdf.fr/image-to-pdf-converter.html" rel="nofollow"&gt; image en PDF convertisseur&lt;/a&gt; offre aux utilisateurs une solution facile pour convertir efficacement des images en fichiers PDF. Il passe par imprimante virtuelle install&#233; dans votre ordinateur pour convertir des formats images( par exemple, JPG, JPEG, BMP,TIFF, etc) en PDF. Il y a plusieurs de m&#233;thodes de conversion que vous pouvez choisir pr&#233;f&#233;r&#233;e. Attention : Nous ne pouvons pas directement glisser/d&#233;placer une image dans notre imprimante.&lt;/p&gt;</description>
      <pubDate>Thu, 04 Nov 2010 01:52:14 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:637b7590-9ae7-4954-b657-d121e3d97ab4</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-37641</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by authentic nikes</title>
      <description>&lt;p&gt;Thanks for posting some great ideas and I&amp;#8217;ll try to return back&lt;/p&gt;


	&lt;p&gt;with a completely different browser to check things out&lt;/p&gt;</description>
      <pubDate>Wed, 03 Nov 2010 03:55:06 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3ae32dad-5e25-4a05-99d0-d2cd82dce393</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-37438</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Tenant Screening</title>
      <description>&lt;p&gt;Nice article to read. Keep posting good and useful information.&lt;/p&gt;</description>
      <pubDate>Tue, 26 Oct 2010 15:03:55 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d630135a-9fc0-4124-b217-dcf52af009da</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-35853</link>
    </item>
    <item>
      <title>"Contracts and Integration Tests for Component Interfaces" by Convert youtube to mp3</title>
      <description>&lt;p&gt;Very interesting. I am glad I came across this.&lt;/p&gt;</description>
      <pubDate>Sun, 25 Jul 2010 21:21:11 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:90127d49-e023-4fc7-a393-c91f7d386c44</guid>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces#comment-17399</link>
    </item>
  </channel>
</rss>

