How to reproduce.
1. Create a new unit testing silverlight project.
2. in the app startup add the following code.
var settings = new UnitTestSettings();
settings.TestHarness = new UnitTestHarness();
settings.StartRunImmediately = true;
settings.TestAssemblies.Add(Assembly.GetExecutingAssembly());
this.RootVisual = UnitTestSystem.CreateTestPage(settings);
3. Add a single test method that can keep track of the number of times the method is executed
EX: add a static class level counter. In the method Increment the counter and display a message box with the current count.
You will notice that when the settings.StartRunImmediately is true the message box will show twice.
This is affecting users of StatLight http://statlight.codeplex.com/workitem/11906
Comments: ** Comment from web user: EVM **
1. Create a new unit testing silverlight project.
2. in the app startup add the following code.
var settings = new UnitTestSettings();
settings.TestHarness = new UnitTestHarness();
settings.StartRunImmediately = true;
settings.TestAssemblies.Add(Assembly.GetExecutingAssembly());
this.RootVisual = UnitTestSystem.CreateTestPage(settings);
3. Add a single test method that can keep track of the number of times the method is executed
EX: add a static class level counter. In the method Increment the counter and display a message box with the current count.
You will notice that when the settings.StartRunImmediately is true the message box will show twice.
This is affecting users of StatLight http://statlight.codeplex.com/workitem/11906
Comments: ** Comment from web user: EVM **
GDay guys,
I posted workaround here.
http://itcrank.blogspot.com.au/2012/02/dodgy-silverlight-unittest-system.html