Silverlight Unit Testing

Silverlight Unit Testing

Old forum URL: forums.lhotka.net/forums/t/6189.aspx


TAC posted on Sunday, January 18, 2009

One weakness of silverlight at the moment seems to be the lack of unit testing options compared to dotNet. From what I can see both NUnit and MbUnit doesn't support it.
For consistency I would prefer to use the same framework for my dotNet and silverlight tests. I don't know much about the Microsoft testing framework and I've heard some bad things about it but it has probably matured since then.
One problem I do have with it is the testing program is integrated into the IDE. Although that has some advantages I've found that it's more trouble than it's worth. Too many times when I've used that setup I've being stepping through my tests, found out what's wrong and without thinking about it hit stop which means that my cleanup code doesn't get run (and I have to go through my database and manually clean it up). I much prefer the NUnit runner separate and attaching to the process. When I hit stop it just stops being attach but the program keeps running and runs my clean up code.

I know that Rocky has written UnitDriven.NET but there really isn't a lot of documentation on it. What's the best setup for testing a silverlight, dotNet solution?

Thanks,
Chris.

sergeyb replied on Sunday, January 18, 2009

If you would like to see UnitDriven testing examples, you can see them in SVN under cslalighttest/unittest.  It illustrates pretty well how to use the framework.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: TAC [mailto:cslanet@lhotka.net]
Sent: Sunday, January 18, 2009 5:00 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Silverlight Unit Testing

 

One weakness of silverlight at the moment seems to be the lack of unit testing options compared to dotNet. From what I can see both NUnit and MbUnit doesn't support it.
For consistency I would prefer to use the same framework for my dotNet and silverlight tests. I don't know much about the Microsoft testing framework and I've heard some bad things about it but it has probably matured since then.
One problem I do have with it is the testing program is integrated into the IDE. Although that has some advantages I've found that it's more trouble than it's worth. Too many times when I've used that setup I've being stepping through my tests, found out what's wrong and without thinking about it hit stop which means that my cleanup code doesn't get run (and I have to go through my database and manually clean it up). I much prefer the NUnit runner separate and attaching to the process. When I hit stop it just stops being attach but the program keeps running and runs my clean up code.

I know that Rocky has written UnitDriven.NET but there really isn't a lot of documentation on it. What's the best setup for testing a silverlight, dotNet solution?

Thanks,
Chris.


Copyright (c) Marimer LLC