Its been a busy couple of months, which has put a serious break on my ability to contribute to anything but my work. But I had some hours left over and figured I'd do an update for the Silverlight Unit Test Runner for the framework made by Jeff Wilcox. It has now been updated to the latest version of the framework that is included in the December 2008 release of Silverlight Toolkit (download the source and you'll find the binaries).
The runner is pretty crude still, and has the same shortcomings as before. This is something I will address as soon as I cross the deadline barrier of the current project I'm on.
Anyhow, the binaries can be found here.
Installation notes:
- Close any open Visual Studio 2008 instances
- Create a directory called SilverlightUnitTestRunner in the C:Program FilesJetBrainsReSharperv4.xBinPlugins directory. If you don't have a plugins directory, create it.
- Uncompress the ZIP file and put them in the created directory.
- Put the Cassini.dll file in your Global Assembly Cache (open explorer, browse to c:WindowsAssembly and drag the file into here).
Voila. You should be good to go. Your unit tests should pop up in the Unit Test Explorer and you can start running them. Mind you, that they will take a little longer to run than other tests running in the unit test explorer. This is something I will try to figure out how to optimize.
Also, if you're interested in the source code for the project, it is available here.
Einar,
Just wanted to let you know. Three points of feedback…
1. I tried running the tests and got this error
FailedSystem.NullReferenceException: Object reference not set to an instance of an object.
at Objectware.Silverlight.Testing.Runner.Resharper.Runners.SilverlightRunner.Finish(TaskExecutionNode node)
at JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.Execute(TaskExecutionNode node) in c:Agentwork3f4db6fd459dabcdsrcTaskRunnerFrameworksrcImplCurrentAppDomainHost.cs: line 119
I got the SourceCode from last Thursday, it seems to be usign the old version of the UT framework. I changed the references, changed other couple of things (mainly CM related), compiled again and it worked.
2. The download for the binaries includes an space at the end.
3. Getting the source to compile it’s a bit of a pain, must of it is because of the difference in the UT version and a problem with the JetBrain’s assembly (I had to remove and add again all the references). It’s not that big of an issue, but is a nicer experience when you just download something, double click it, hit F5 and works.
Uuups, again I don’t know what happened. It looked like it worked before.
FailedObjectware.Silverlight.Testing.Runner.Resharper.Runners.SilverlightTaskException: Exception of type ‘Objectware.Silverlight.Testing.Runner.Resharper.Runners.SilverlightTaskException’ was thrown.
— Exception doesn’t have a stack trace —
Also, it looks like it tries to add all my tests altough it only shows the selected one.
Thanks for the comments guys. I fixed the URL, and I’ll fix the references. Probably a bad checkin from my computer to CodePlex.
I’ll try squeeze in some time during the christmas holiday to fix the plugin a bit more. There are a couple of loose ends in it. Just wanted to get it out there as soon as possible.
Hi Einar,
I’m trying to run the SilverlightRunner R# plugin with the Silverlight Toolkit December 2008 shipped source and all tests fail with the following exception:
: FailedSystem.NullReferenceException: Object reference not set to an instance of an object.
at Objectware.Silverlight.Testing.Runner.Resharper.Runners.SilverlightRunner.Finish(TaskExecutionNode node)
at JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.Execute(TaskExecutionNode node) in c:Agentwork3f4db6fd459dabcdsrcTaskRunnerFrameworksrcImplCurrentAppDomainHost.cs: line 119
Can you please ping me at J@JustinAngel.Net with some instructions on how to get this to work?
I’m planning to do some hands on testing and getting the Unit testing explorer to work with Silverlight is huge up side. So any help here would be much appreciated.
— Justin Angel
Microsoft Silverlight Toolkit Program Manager