Silverlight Testing framework bug – FrameworkElements are not visible on the TestSurface


Working with the Silverlight testing framework the last three weeks has been interesting.  I ran into a crazy intermittent bug which drove me made for about 2 hours.  The usercontrol that I was adding to the TestSurface would be visible about 50% of the time when running my tests. The test would still run and I could hear the audio portion of the videos that were playing as part of an integration test, but the Controls were not visible on the test surface. All I could see was the blank test surface and the testing framework status on the right side of the test runner.

 
After resorting to reflector on the test framework I found that the TestSurface is a Grid control.  That got me to think that since my controls parent control is also a Grid control that maybe the nested grids are just having some sort of issue.  I ended up solving the problem by Adding my controls to a Canvas control and adding the Canvas instance to the TestSurface.  Code as follows……

Subscribe to this feed: https://feeds.feedburner.com/erichexter 

si-testing-testsurfacebug

 

This solved my problem… The issue is not with the test framework as much as the silverlight runtime.  It is still beta so what do you expect?

More posts on the test framework, both unit testing and integration testing, to come soon.

 

Additional Info: 

For more information about the silverlight testing framework see: http://www.jeff.wilcox.name/2008/03/31/silverlight2-unit-testing/

ASP.Net MVC framework – New version of the MVC Contrib project! – v 0.0.1.101