Testing Challenge – Silverlight

I am getting involved in another project, that looks like has its own testing challenges (last project I was involved was a BizTalk based project, quite a few testing challenges!).

What have I seen so far with Silverlight (version 4.0):

  1. TDD with the toolset we always utilized is no longer possible (Gallio, TestDriven.NET, NCover) partially due to the nature of Silverlight, partially because of the tools support that is not yet in place
  2. MVVM pattern – developers wrapping around the idea
  3. Explosion of Microsoft technologies that are just “out of college” and not yet applicable in TDD case
  4. Limited resources on .NET code detours (I only encountered Moles and TypeMock, but for commercial Silverlight product both are commercial)
  5. Natural limitations of Silverlight (sandbox, static DependencyObject properties, inheritance from the system)

Looks like this is going to be an interesting journey. Feel free to share your experiences and findings.

2 Comments

  • I am not a developer but from my experience, Silverlight development is definitely a bigger challenge than it should be.

    I think this is largely due to the fact that Silverlight is a subset of the .NET development world and hence has fewer developers solving these age old problems. Just not that many high-end Silverlight developers out there compared to other platforms.

    It is also more closely related to AJAX applications in architecture (smart browser-side client with less processing on the server) so the thinking is quite different than old MVP patterns.

    With Microsoft encorporating Silverlight into SharePoint, we should start seeing more experience in the developer ranks. Still, I wouldn't count on MS to drive the TDD/BDD stuff forward.

    Still it is pretty powerful stuff if you can wrap your head around it all. Let us know if you manage to push the envelope forward on this, I'm sure you'll be breaking some new ground.

  • You can get quite far with plain .net test assemblies without the pain of the MSTest framework. I'm using MSpec (I couldn't do without its compact readable syntax) to drive all my specs at a unit level. Then for acceptance specs, SpecFlow combined with White and WatIn. You come across the odd edge case where things wont run, serialization for example but you can then fallback to MSTest or I found an NUnit for Silverlight (sorry can't remember where) with MoqU.Silverlight. In my experience so far these types of tests tend to be integration ones.

Comments have been disabled for this content.