[Opensim-dev] Automated Testing

Sean Dague sean at dague.net
Sat Dec 15 18:16:36 UTC 2007


On Sat, Dec 15, 2007 at 12:53:36PM -0500, Gerikes wrote:
> Hi all.
> 
> Just starting to look at this project, and seems interesting enough. I come
> from a short background creating internal corperate web sites using C# /
> Monorail, but have interests in virtual worlds, and am happy to see such a
> project being built on .NET.
> 
> Anyway, I've been using automated unit and integration testing for almost a
> year now, and found it drastically increased the quality of my code. What is
> the position of the project in terms of how unit testing are implemented?
> Does anyone on the project write their own but just not commit them?
> 
> I'd be hasty to try to come in here trying to change the world (so to
> speak), so perhaps I'll start smaller. I'm planning on trying to grok the
> code base by developing my own test harness that can be used for integration
> testing. Basically, it would be a region that could be started, and have
> tests run against it, probably in the form of sending commands through bots
> connected using libsecondlife. The API would allow for the tests to run
> multiple times, perhaps switching out things like which data store manager
> is used during the test so that a single test can be run against multiple
> implementations.
> 
> I would try to allow the creation of tests to be simple and straightforward,
> such as...
> 
> 
> [Test]
> public void CanInstantMessage()
> {
> const string message = "Test Message";
> 
> TestAvatar avatar1 = ActivateNewAvatar();
> TestAvatar avatar2 = ActivateNewAvatar();
> avatar1.Perform(Action.InstantMessage(avatar2, message));
> 
> Assert.AreEqual(1, avatar2.RecievedMessages.From(avatar2).Count);
> Assert.AreEqual(message, avatar2.RecievedMessages.From
> (avatar2).First().Message);
> }
> 
> So that's it, I'm interested in any feedback you have.

++++ on getting some automated testing into the tree.  The lack of that
right now is mostly based on rapid turnover in the current code, and
lack of time, not lack of interest.

Patches that start to integrate automated testing into the tree are
welcomed as long as they can be executed on both MS.NET and Mono using
nant (we're very strongly bi-platform).

My suggestion is to start small on one area of the code and get that
well tested, then extend througout.  I think you'll get a lot of support
from everyone in the dev team if you jump in and start contributing
here.

More work on test engineering is one of my new years resolutions.

     -Sean

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071215/fbc050a8/attachment-0001.pgp>


More information about the Opensim-dev mailing list