Title: Windows Live Agents Testing: Introduction
Slug: windows-live-agents-testing-introduction
Date: 2008-05-11 08:55:00
Author: Kartones
Lang: en
Tags: Testing, Development, Windows Live Agents
Description: An introduction to testing Windows Live Agents.

 <p align="justify"><b style="line-height: 1.428571429;">Update</b><span style="line-height: 1.428571429;">: Parts </span><a href="https://blog.kartones.net/post/windows-live-agents-testing-building-the-framework" style="line-height: 1.428571429;">II</a><span style="line-height: 1.428571429;"> and </span><a href="https://blog.kartones.net/post/windows-live-agents-testing-improving-the-framework" style="line-height: 1.428571429;">III</a><span style="line-height: 1.428571429;"> of this posts available. </span></p><p align="justify">Developing a Windows Live Agent is much like developing any software solution. Your team creates code, you test it, the customer tests it from the user side, you fix bugs and add functionality, and the cycle goes on until you're finished.</p> <p>Although the new 5.0 SDK will feature full Visual Studio integration (and with that, Team Foundation Server and/or Visual Sourcesafe integration), current version is a bit more oriented to single-user development.</p> <p>After working for more than a year developing WLAs, we at <a href="http://www.ilitia.com">ilitia</a> have built a small infrastructure (mostly virtualized/using virtual machines). Right now our WLA department works like this diagram:</p> <p><img src="https://images.kartones.net/posts/screenshots/windowsliveagents_ilitiaenv.jpg"> </p> <p>Each developer works with a local copy of the WLA (using Visual Sourcesafe to integrate changes), having a local testing Microsoft Passport-enabled account.<br></p> <p>We have a "WLA Server" in which we upload (at least once per week) the latest working build, which runs in another account that we give to our customer since the second or third week of development, so they can start testing the agent early and giving feedback (agile development and that stuff ;), just using their Windows Live Messenger clients.<br><br>We create mocks of customer Web Services if it is feasible (somethimes they're too complex, or the customer already has a testing WS created) and the Activity Window web pages and host them too, until the Activity is provisioned to Messenger.</p> <p>We also have a private WLA intranet with our own tutorials, development guidelines and repository for Buddyscript modules, documents, testing account-password pairs and such.</p> <p> </p> <p>One feature we're still missing is automatic unit test battery launching, like in a Continuous Integration server. But we <b>do</b> have unit testing since two months or so. If you want some info about the platform's default testing capabilities you can check some official posts of the WLA team's blog.</p> <p>The system was somewhat lacking advanced features and more testing options, and coming from the NUnit testing world, I decided to make a new unit testing framework from scratch (although I used some of the original framework as basis, it has been heavily modified and improved).</p> <p>I won't show any code until the next post, but this is an example of a sample passing battery output:</p> <p><font face="Courier New">-----------------------<br>Begin testing: TestUtilitiesAddon -&gt; TestExCompareQueryArray() Test Battery<br>Test: "TestExCompareQueryArray"<br>Test: "TestExCompareQueryArrayNotEqual"<br>Test: "TestExCompareQueryArrayNotEqual"<br>Test: "TestExCompareQueryArray"<br>Done testing TestUtilitiesAddon -&gt; TestExCompareQueryArray() Test Battery<br>Total tests: 4   Passed tests: 4   Failed tests: 0<br>Test battery passed<br>-----------------------</font>  </p><p>(as you might notice, I've used the framework to test it's own testing/assert methods ;)</p> <p>A sample output of a failed test could be like this one:</p> <p><font face="Courier New">-----------------------<br>Begin testing: TestUtilitiesAddon -&gt; TestExCompareObjects() Test Battery<br>Test: "TestExCompareObjects"</font><br><font face="Courier New">Error: "not object #2" failed.<br>Returned: "not object #2"<br>"not object #2" not an object<br>-----------------------<br>Done testing TestUtilitiesAddon -&gt; TestExCompareObjects() Test Battery<br>Total tests: 1 Passed tests: 0 Failed tests: 1<br>Test battery failed<br>-----------------------</font></p> <p> </p> <p>In the next post I will show the basics of building a testing framework and how to test both variable values and objects.</p>
