[Opensim-dev] Automated Testing
Dünnebeil Gerhard
Gerhard.Duennebeil at arcs.ac.at
Mon Dec 17 07:22:21 UTC 2007
Hi Gerikes
I only can agree with you about code quality and esp. stability after unit tests are introduced.
I started working on introducing unit tests to the meshing code. Nono of that is currently in the repository although I have most of that code under test.
I will carry that on when the pre-Christmas stress has ebbed away in (hopefully) a week from now.
Other plans are a test framework for the physics engine that allows to replay reproducable situations.
Definitely interested in this issue.
best regards and happy christmas
Gerhard
________________________________
Von: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-bounces at lists.berlios.de] Im Auftrag von Gerikes
Gesendet: Samstag, 15. Dezember 2007 18:54
An: Opensim-dev at lists.berlios.de
Betreff: [Opensim-dev] Automated Testing
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071217/cce2b7ea/attachment-0001.html>
More information about the Opensim-dev
mailing list