Duplicated test results in TeamCity.

May 28, 2010 at 2:18 PM

Hello,

I have configured the TeamCity the same way as described here - 

 http://www.keith-woods.com/Blog/post/Silverlight-Unit-Test-and-Continuous-Integration-StatLight.aspx

I use MSBuild as build runner. I've created a target, that looks like:

<Target Name="ClientTest">
    <Exec Command="D:\StatLight\StatLight.exe -x=&quot;$(ClientSrcDir)\ClientTests\Bin\Debug\ClientTests.xap&quot; --teamcity"/>
  </Target>

The I just call the target during the build process.

Then I see an interesting thing that the test results are duplicated.

E.g. I expected to see "Test failed: 1, passed: 3, ignored: 2",

but instead of it I see  "Test failed: 2, passed: 6, ignored: 4",

I thought that MSBuild runs my target twice, but I looked at the log and saw that TeamCity duplicates the log, but it does't run the target twice.

Does anybody ran into such issue?

Is it an integration problem between TeamCity, MBuild and StatLight?

P.S. : If I use 'Command Line' as build runner, it works fine and generates appropriate test results. But I need to use MSBuild, it is a project requirement.

Coordinator
May 28, 2010 at 7:00 PM

Just an FYI: I've read your thread, however don't have any specific ideas as to what to try.

Could you post the full Log from teamcity? (or at least the statlight portion?

I'll try to get some time and test it (however it may take some time as I have to setup a V.M. and get things setup to test...).

 

May 31, 2010 at 8:30 AM

Attaching the part of the log with StatLight task.

If you look at the time commands are executed, you will see that it goes 11:13:00, then 11:13:02, then 11:13:03, and then ... again 11:13:00, then 11:13:02 ...

 

 

11:12:30]: Task "Exec" (TaskId:631)
[11:12:30]:   "C:\Program Files\MSBuild\..\StatLight\StatLight.exe" -x=D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap --teamcity (TaskId:631)
[11:12:30]:     [Target "ClientTest"] "C:\Program Files\MSBuild\..\StatLight\StatLight.exe" -x=D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap --teamcity
[11:12:35]:    (TaskId:631)
[11:12:35]:   StatLight - Version 1.0.3780 (TaskId:631)
[11:12:35]:   Copyright (C) 2009 Jason Jarrett (TaskId:631)
[11:12:35]:   All Rights Reserved. (TaskId:631)
[11:12:35]:    (TaskId:631)
[11:12:35]:     [Target "ClientTest"] StatLight - Version 1.0.3780
[11:12:35]:     [Target "ClientTest"] Copyright (C) 2009 Jason Jarrett
[11:12:35]:     [Target "ClientTest"] All Rights Reserved.
[11:12:41]:  
[11:12:41]: D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap
[11:12:41]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:12:41]:     [Target "ClientTest"] D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] TestViewModelInitialization
[11:13:00]:   [TestViewModelInitialization] [Test Output]
 (TaskId:631)
 
[11:13:00]:   [TestViewModelInitialization] Test ignored: TestViewModelInitialization
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] TestViewModelInitialization
[11:13:00]:   [TestViewModelInitialization] [Test Output]
 (TaskId:631)
 
[11:13:00]:   [TestViewModelInitialization] Test ignored: TestViewModelInitialization
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyBinding
[11:13:00]:   [VerifyBinding] [Test Output]
 (TaskId:631)
 
[11:13:00]:   [VerifyBinding] Test ignored: VerifyBinding
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyPropertyChanged
[11:13:00]:   [VerifyPropertyChanged] [Test Output]
 (TaskId:631)
 
[11:13:00]:   [VerifyPropertyChanged] Test ignored: VerifyPropertyChanged
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:00]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] TestViewModelInitialization
[11:13:00]:       [TestViewModelInitialization] Test ignored: TestViewModelInitialization
[11:13:02]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:02]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.
[11:13:02]:   [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] [Test Output]
 (TaskId:631)
 
[11:13:02]:   [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] System.NullReferenceException: Object reference not set to an instance of an object.
   at EmpowerClient.Common.RestServiceClient.DoElementResponse(IAsyncResult result)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[11:13:02]:   [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] System.NullReferenceException: Object reference not set to an instance of an object.
   at EmpowerClient.Common.RestServiceClient.DoElementResponse(IAsyncResult result)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[11:13:02]:   [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] [Test Output]
 (TaskId:631)
 
[11:13:02]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyVisibility
[11:13:03]:   [VerifyVisibility] [Test Output]
 (TaskId:631)
 
[11:13:03]:   [VerifyVisibility] Test ignored: VerifyVisibility
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] [Test Output]
 (TaskId:631)
 
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. Failed at time - 5/28/2010 3:13:03 PM125
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message)
   at ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding()
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. Failed at time - 5/28/2010 3:13:03 PM125
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message)
   at ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding()
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] [Test Output]
 (TaskId:631)
 
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyBindingAsynch.
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyBindingAsynch.] [Test Output]
 (TaskId:631)
 
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyCollectionChanged.
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyCollectionChanged.] [Test Output]
 (TaskId:631)
 
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyPropertyChangeEvent.
[11:13:03]:   [ClientTests.TrackingTests.TrackingPanelTest.VerifyPropertyChangeEvent.] [Test Output]
 (TaskId:631)
 
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  (TaskId:631)
[11:13:00]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] TestViewModelInitialization
[11:13:00]:       [TestViewModelInitialization] Test ignored: TestViewModelInitialization
[11:13:00]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyBinding
[11:13:00]:       [VerifyBinding] Test ignored: VerifyBinding
[11:13:00]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyPropertyChanged
[11:13:00]:       [VerifyPropertyChanged] Test ignored: VerifyPropertyChanged
[11:13:02]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.
[11:13:02]:       [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] System.NullReferenceException: Object reference not set to an instance of an object.
   at EmpowerClient.Common.RestServiceClient.DoElementResponse(IAsyncResult result)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[11:13:02]:       [ClientTests.PropertyGroupTests.PropertyGroupTests.VerifyPropertyGroupDefinitionPropertyChanged.] System.NullReferenceException: Object reference not set to an instance of an object.
   at EmpowerClient.Common.RestServiceClient.DoElementResponse(IAsyncResult result)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] VerifyVisibility
[11:13:03]:       [VerifyVisibility] Test ignored: VerifyVisibility
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.
[11:13:03]:       [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. Failed at time - 5/28/2010 3:13:03 PM125
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message)
   at ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding()
[11:13:03]:       [ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding.] Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. Failed at time - 5/28/2010 3:13:03 PM125
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message)
   at ClientTests.TrackingTests.TrackingPanelTest.VerifyBinding()
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyBindingAsynch.
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyCollectionChanged.
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]    (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]    (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]   --- Completed Test Run at: 5/28/2010 11:13:03 AM. Total Run Time: 00:00:22.5625000 (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]    (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]   Test run results: Total 10, Successful 3, Failed 2, Ignored 5 (TaskId:631)
[11:13:03]:  [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap]  
[11:13:03]:  (TaskId:631)
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] ClientTests.TrackingTests.TrackingPanelTest.VerifyPropertyChangeEvent.
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] --- Completed Test Run at: 5/28/2010 11:13:03 AM. Total Run Time: 00:00:22.5625000
[11:13:03]:      [D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap] Test run results: Total 10, Successful 3, Failed 2, Ignored 5
[11:13:07]: D:\EmpowerCheckoutDir\build\EmpowerBuild.proj(149,5): error MSB3073: The command ""C:\Program Files\MSBuild\..\StatLight\StatLight.exe" -x=D:\EmpowerCheckoutDir\build\..\Source\Client\ClientTests\Bin\Debug\ClientTests.xap --teamcity" exited with code 1. [D:\EmpowerCheckoutDir\build\EmpowerBuild.proj.teamcity.patch.tcprojx]
[11:13:07]: Done executing task "Exec" -- FAILED. (TaskId:631)

Jun 8, 2010 at 10:16 AM

Today I found one more interesting thing. When I run tests via command line, StatLight browser host shows me Total number of tests = 48 in the upper left corner, but actually there are 24 tests in my project.

Also, when test run is finished, I see results in command prompt - Total 24, passed 3, failed 11, Ignored 10...

Wanted to past a screenshot, but cannot do it on this editor.

Coordinator
Jun 8, 2010 at 1:22 PM

Yes, Thanks... (That one is a known issue)

I haven't figured out what's causing the MSTest U.I. to double count the number of tests (yet).

I think this part is harmless.

 

Jun 8, 2010 at 4:04 PM

Hi again,

if I add to my test 'MessageBox.Show("")', StatLight also increases the number of total tests... For example, I have 3 lines with 'MessageBox.Show("")' in one test, and I run only this one test using Tag expression, I will have the following result:

Total: 4, successful 0, failed 4.

Not funny.

The log in command prompt looks like this:

Starting Test Run: 6/8/2010 5:57:00 PM


------------------ Test Failed ------------------
Test Namespace:  [StatLight]
Test Class:  [CannotFigureItOut]
Test Method: [NotEnoughContext]
Other Info: A Silverlight MessageBox dialog was automatically closed.
Caption: CallBack1
Dialog Message:

-------------------------------------------------

------------------ Test Failed ------------------
Test Namespace:  [StatLight]
Test Class:  [CannotFigureItOut]
Test Method: [NotEnoughContext]
Other Info: A Silverlight MessageBox dialog was automatically closed.
Caption: 0
Dialog Message:

-------------------------------------------------

------------------ Test Failed ------------------
Test Namespace:  [StatLight]
Test Class:  [CannotFigureItOut]
Test Method: [NotEnoughContext]
Other Info: A Silverlight MessageBox dialog was automatically closed.
Caption: System.Windows.Controls.Grid
Dialog Message:

-------------------------------------------------

------------------ Test Failed ------------------
Test Namespace:  ClientTests.DashboardPanels.ResultPanel
Test Class:  ResultPanelTests
Test Method: TestResultTableColumnsAndRows
Exception Message:
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.AreEqual failed. Expected:&lt;12&gt;. Actual:&lt;
0&gt;. Incorrect number of columns are in the grid.

   bla-bla-bla------------------------------------------------


--- Completed Test Run at: 6/8/2010 5:57:37 PM. Total Run Time: 00:00:36.3594264

Test run results: Total 4, Successful 0, Failed 4,

I don't think this is harmless...

Coordinator
Jun 8, 2010 at 6:50 PM
Edited Jun 8, 2010 at 6:51 PM
This is to be expected.
The "Server" side of StatLight is responsible for detecting and auto-closing modal dialogs (MessageBox, Debug.Asserts). In the case of a MessageBox, I currently don't have a way detect what method/test is executing to match the failure message box message with.

So if you have 1 test with 1 message box you will see 2 final results. (the test pass/fail and the message box auto-close reported as a failure).

It's different with a Debug.Assert dialog - because I can figure out from the stacktrace in the dialog which test was being executed when the server detected this dialog and closed it. Therefore, I can report for 1 test with a debug.assert 1 total result (and it'll be a failure).

It's recommended you avoid message boxes in unit/integration silverlight tests.

Hope this helps.
Aug 6, 2011 at 7:11 PM
Edited Aug 7, 2011 at 2:34 PM

I do not have MessageBox and I also get duplicated count :(

What could it be?

Edit: just a short note to let everybody know that in  my case I get double results executing StatLight via command line.

Coordinator
Aug 7, 2011 at 8:43 PM

This is a known issue with the MSTest framework. see http://silverlight.codeplex.com/workitem/7143 No work arounds at this point.