2013-05-02 17 views
6

< TLDR>
Running test MSTest z wiersza poleceń zawiesza się bez żadnych błędów lub limity czasu podczas „czeka na przebiegów/agentów”. Powodem może być to, że "nie ma żadnych uruchomień w kolejce", ale dlaczego tak się dzieje, więc nie mam pojęcia, ponieważ ten sam test działa dokładnie na innej maszynie.
</TLDR>MSTest zawiesza się pozornie bez powodu


Niedawno przeniósł się z oceny TeamCity na maszynie testowej zainstalowaniem go w naszym środowisku produkcyjnym. Po migracji wszystkich naszych konfiguracji kompilacji nagle pojawiły się problemy z naszymi testami MSTest: żaden nie działał.

Po debugowaniu wszystkiego, co możemy wymyślić, uważamy, że wykluczyliśmy cokolwiek wspólnego z TeamCity. Pozostaje nam wierzyć, że jest to coś bezpośrednio z MSTest. Jako prosty sposób na odtworzenie naszego problemu, stworzyłem testowe rozwiązanie MSTestTest (C# 4.0) w Visual Studio.

Ma jeden projekt MSTestTest z jednej klasy Klasa1:

namespace MSTestTest 
{ 
    public static class Class1 
    { 
     public static string Foo() 
     { 
      return "Bar"; 
     } 
    } 
} 

Ma inny projekt MSTestTestTest z jednym MSTest klasy testowej UnitTest1:

using MSTestTest; 
using Microsoft.VisualStudio.TestTools.UnitTesting; 

namespace MSTestTestTest 
{ 
    [TestClass] 
    public class UnitTest1 
    { 
     [TestMethod] 
     public void TestMethod1() 
     { 
      Assert.AreEqual("Bar", Class1.Foo()); 
     } 
    } 
} 

Rozwiązanie jest kompilowane i kopiuję jego dwie biblioteki DLL (M STestTest.dll i MSTestTestTest.dll) na nasz stary serwer testowy i nasz nowy serwer produkcyjny. Na obu serwerach edytowałem plik MSTest.exe.config, aby pisać szczegółowe informacje rejestrowania do C: \ Temp \ MSTestTrace.log().

zarówno na serwerze testowym i serwera produkcyjnego Następnie przeprowadź testy z linii poleceń tak:

mstest /testcontainer:MSTestTestTest.dll /resultsfile:results.trx 

na serwerze testowym dostaję pomyślnego wyniku testu od razu:

C:\temp\MSTestTestTest>mstest /testcontainer:MSTestTestTest.dll /resultsfile:results.trx 
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 
Copyright (c) Microsoft Corporation. All rights reserved. 

Loading MSTestTestTest.dll... 
Starting execution... 

Results    Top Level Tests 
-------    --------------- 
Passed    MSTestTestTest.UnitTest1.TestMethod1 
1/1 test(s) Passed 

Summary 
------- 
Test Run Completed. 
    Passed 1 
    --------- 
    Total 1 
Results file: C:\temp\MSTestTestTest\results.trx 
Test Settings: Default Test Settings 

na serwerze produkcyjnym jednak wszystko mam to:

C:\Temp\MSTestTestTest>mstest /testcontainer:MSTestTestTest.dll /resultsfile:results.trx 
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 
Copyright (c) Microsoft Corporation. All rights reserved. 

Loading MSTestTestTest.dll... 
Starting execution... 

mam opuścił serv er działa przez wiele godzin, ale nic się nie dzieje. Bez limitu czasu, bez błędów, bez niczego. W tym momencie całkowicie utknąłem, gdzie kontynuować.

Oto fragment z dziennika śledzenia na serwerze testowym (pełna dziennika can be seen here (z innej, ale identyczne run)):

15:02:39.525, TestAgentProcessReady: total # of execution agents=1. 
15:02:39.525, ControllerExecution.TestAgentProcessReady: areAllAgentProcessesReady=True. 
15:02:39.525, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver)+ExternalJob.ProcessJob: successfully invoked job processor for job 'ReceivedTestMessageWrapper for test message 'Microsoft.VisualStudio.TestTools.Execution.TestAgentProcessStartedMessage' from agent 'TRUTVBYGG01'' 
15:02:39.634, ControllerObject: RunQueueThread waiting for runs/agents... 
15:02:39.744, AgentProcessManager.StartTestAgentRun_DoWork: tests were queued to test agents. 
15:02:39.744, ControllerExecution.SyncAllExecutionAgentsReady: finished waiting on m_agentProcessesInitialized: signaledIndex=0 
15:02:39.744, StateMachine(RunState): SetNextState Started called 
15:02:39.744, StateMachine(RunState): In state Started. Waiting for state change... 
15:02:39.744, StateMachine(RunState): Exit wait for state change, current state is Started. 
15:02:39.744, StateMachine(RunState): calling state handler for Started 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: invoking special job checker for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: successfully invoked special job checker for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: isSpecial = False 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.RunStateEvent: TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, ControllerObject: RunStartedHandler called for run 9363144a-38a7-4ee1-a920-1e1a3584859b 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry: Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
15:02:39.744, StateMachine(RunState): SetNextState Running called 
15:02:39.744, StateMachine(RunState): In state Running. Waiting for state change... 
15:02:39.744, StateMachine(RunState): Exit wait for state change, current state is Running. 
15:02:39.744, StateMachine(RunState): calling state handler for Running 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: invoking special job checker for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Running' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: successfully invoked special job checker for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Running' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: isSpecial = False 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.RunStateEvent: TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Running' 
15:02:39.744, StateMachine(RunState): In state Running. Waiting for state change... 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender)+ExternalJob.ProcessJob: invoking job processor for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: invoking special job checker for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: successfully invoked special job checker for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
15:02:39.744, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: isSpecial = False 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.TestMessageBulk: Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender)+ExternalJob.ProcessJob: successfully invoked job processor for job 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor)+ExternalJob.ProcessJob: invoking job processor for job 'Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor)+ExternalJob.ProcessJob: successfully invoked job processor for job 'Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver)+ExternalJob.ProcessJob: invoking job processor for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
15:02:39.744, LocalRunMessageListener.OnProcessReceivedTestMessage: Handling message 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Started' 
15:02:39.744, LocalRunMessageListener: RestartTimer 
15:02:39.744, LocalRunMessageListener.OnProcessReceivedTestMessage: Handling message 'TRUTVBYGG01: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}: Running' 
15:02:39.744, LocalRunMessageListener: RestartTimer 
15:02:39.744, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver)+ExternalJob.ProcessJob: successfully invoked job processor for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver).TryEnqueueJob: invoking special job checker for job 'ReceivedTestMessageWrapper for test message 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' from agent 'TRUTVBYGG01'' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver).TryEnqueueJob: successfully invoked special job checker for job 'ReceivedTestMessageWrapper for test message 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' from agent 'TRUTVBYGG01'' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver).TryEnqueueJob: isSpecial = False 
15:02:39.900, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper: ReceivedTestMessageWrapper for test message 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' from agent 'TRUTVBYGG01'' 
15:02:39.900, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver)+ExternalJob.ProcessJob: invoking job processor for job 'ReceivedTestMessageWrapper for test message 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' from agent 'TRUTVBYGG01'' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: invoking special job checker for job 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: successfully invoked special job checker for job 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: isSpecial = False 
15:02:39.900, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.TestStateEvent: Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' 
15:02:39.900, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver)+ExternalJob.ProcessJob: successfully invoked job processor for job 'ReceivedTestMessageWrapper for test message 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' from agent 'TRUTVBYGG01'' 
15:02:39.900, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender)+ExternalJob.ProcessJob: invoking job processor for job 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' 
15:02:39.900, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: invoking special job checker for job 'Run {9363144a-38a7-4ee1-a920-1e1a3584859b}, Test {854d1b23-760d-4e32-a6c7-91b74b5f2409}: Started' 

I tu jest podobny fragment z serwera produkcyjnego (pełna log can be seen here (z innej, ale identycznym okresie)), pokazując, gdzie wszystko zaczyna się powiesić:

16:33:50.260, TestAgentProcessReady: total # of execution agents=1. 
16:33:50.260, ControllerExecution.TestAgentProcessReady: areAllAgentProcessesReady=True. 
16:33:50.260, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Controller.ReceivedTestMessageWrapper>(ControllerExecution.TestMessageReceiver)+ExternalJob.ProcessJob: successfully invoked job processor for job 'ReceivedTestMessageWrapper for test message 'Microsoft.VisualStudio.TestTools.Execution.TestAgentProcessStartedMessage' from agent 'TRAPPUTVTCP01'' 
16:33:50.292, AgentProcessManager.StartTestAgentRun_DoWork: tests were queued to test agents. 
16:33:50.292, ControllerExecution.SyncAllExecutionAgentsReady: finished waiting on m_agentProcessesInitialized: signaledIndex=0 
16:33:50.292, StateMachine(RunState): SetNextState Started called 
16:33:50.292, StateMachine(RunState): In state Started. Waiting for state change... 
16:33:50.292, StateMachine(RunState): Exit wait for state change, current state is Started. 
16:33:50.292, StateMachine(RunState): calling state handler for Started 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: invoking special job checker for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: successfully invoked special job checker for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: isSpecial = False 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.RunStateEvent: TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.292, ControllerObject: RunStartedHandler called for run 453f4093-9409-40f3-9651-34caa1b8c92a 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry: Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
16:33:50.292, StateMachine(RunState): SetNextState Running called 
16:33:50.292, StateMachine(RunState): In state Running. Waiting for state change... 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor)+ExternalJob.ProcessJob: invoking job processor for job 'Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry>(ControllerObject.RunQueueMessageProcessor)+ExternalJob.ProcessJob: successfully invoked job processor for job 'Microsoft.VisualStudio.TestTools.Execution.ControllerQueueEntry' 
16:33:50.292, StateMachine(RunState): Exit wait for state change, current state is Running. 
16:33:50.292, StateMachine(RunState): calling state handler for Running 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: invoking special job checker for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Running' 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: successfully invoked special job checker for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Running' 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: isSpecial = False 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.RunStateEvent: TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Running' 
16:33:50.292, StateMachine(RunState): In state Running. Waiting for state change... 
16:33:50.292, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender)+ExternalJob.ProcessJob: invoking job processor for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.292, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: invoking special job checker for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
16:33:50.307, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: successfully invoked special job checker for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
16:33:50.307, BackgroundSpecialJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: isSpecial = False 
16:33:50.307, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver).TryEnqueueJob: Queuing job 'Type Microsoft.VisualStudio.TestTools.Common.TestMessageBulk: Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
16:33:50.307, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(ControllerExecution.TestMessageSender)+ExternalJob.ProcessJob: successfully invoked job processor for job 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.307, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver)+ExternalJob.ProcessJob: invoking job processor for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
16:33:50.307, LocalRunMessageListener.OnProcessReceivedTestMessage: Handling message 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Started' 
16:33:50.307, LocalRunMessageListener: RestartTimer 
16:33:50.307, LocalRunMessageListener.OnProcessReceivedTestMessage: Handling message 'TRAPPUTVTCP01: Run {453f4093-9409-40f3-9651-34caa1b8c92a}: Running' 
16:33:50.307, LocalRunMessageListener: RestartTimer 
16:33:50.307, BackgroundJobProcessor<Microsoft.VisualStudio.TestTools.Common.TestMessage>(LocalRunMessageListener.TestMessageReceiver)+ExternalJob.ProcessJob: successfully invoked job processor for job 'Microsoft.VisualStudio.TestTools.Common.TestMessageBulk' 
16:33:50.401, ControllerObject: RunQueueThread there are no runs in the queue. 
16:33:50.510, ControllerObject: RunQueueThread waiting for runs/agents... 
16:34:10.291, LocalRunMessageListener: RestartTimer 
16:34:10.291, ControllerExecution: Sent heartbeat to listeners 
16:34:30.321, LocalRunMessageListener: RestartTimer 
16:34:30.321, ControllerExecution: Sent heartbeat to listeners 
16:34:50.352, LocalRunMessageListener: RestartTimer 
16:34:50.352, ControllerExecution: Sent heartbeat to listeners 
16:35:10.382, LocalRunMessageListener: RestartTimer 
16:35:10.382, ControllerExecution: Sent heartbeat to listeners 
16:35:30.412, LocalRunMessageListener: RestartTimer 
16:35:30.412, ControllerExecution: Sent heartbeat to listeners 
16:35:50.443, LocalRunMessageListener: RestartTimer 

próbowałem zostały również uruchomiony wiersz polecenia, z którego używam MSTest jako administrator, ale wstałem wydaje się, że robi różnicę.

Wszelkie sugestie dotyczące tego, jaki powinien być mój następny krok, będą bardzo mile widziane!

Odpowiedz

19

Problem polega na błędzie z MSTest, gdy Visual Studio 2010 i Visual Studio 2012 są instalowane obok siebie. Rozwiązaniem jest zainstalowanie dodatku Service Pack 1 dla Visual Studio 2010.

zdałem sobie sprawę, to patrząc w > Dzienniki systemu Windows Applications w Viewer Event. Nie znalazłem błąd ze źródła VSTTAgentProcess (który nie był obecny w każdym z dzienników MSTest śladowych I został pominie):

(QTAgent32.exe, PID 6912, Thread 9) AgentObject.OnBackgroundSendTestMessage: Connection to controller was lost. 
System.Runtime.Remoting.RemotingException: 
The argument type 'Run {b816a0d9-50f3-490a-96b8-479555466167}, Test {8a2710b4-3cf9-441c-bd5c-0efb0601e059}: Started' cannot be converted into parameter type 'Microsoft.VisualStudio.TestTools.Common.TestMessage'. 
---> System.InvalidCastException: Object must implement IConvertible. 
    at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) 
    at System.Runtime.Remoting.Messaging.Message.CoerceArg(Object value, Type pt) 
    --- End of inner exception stack trace --- 

Googling dla tego wyjątku następnie doprowadził mnie do this post explaining the VS 2010/2012 issue.

Warto również wspomnieć, że musiałem zainstalować narzędzia Microsoft Office Developer Tools before I was able to install VS2010 SP1.

+0

Dzięki, to zadziałało dla mnie! –

+1

Dobra. Dla mnie problem był widoczny również w przypadku VS2010 i VS2013 obok siebie. (Nigdy nie instalowałem VS2012) –

+0

Dziękuję! Możesz także użyć narzędzi VS11 zamiast VS10, działa to dla mnie. – 2xMax

0

Mam te same symptomy, ale nieco inne ustawienia: przygotowuję maszynę bu2 vs2015, która musi zbudować projekt vs2015 przeniesiony z 2010 roku, hostowany na tfs 2010, Wiem: niezły bałagan. Nie miałem wersji 2010 zainstalowanej na tej maszynie do budowania

Rozwiązałem wcześniej instalację pakietu redystrybucyjnego "Microsoft Visual Studio 2010 Shell (Integrated)" dostępnego w witrynie MSDN, a następnie dodałem do niego SPS VS 2010. używanie powłoki "izolowanej" nie wydaje się działać dzięki za pomoc w rozwiązaniu tego labiryntu o_O

+0

Czy kiedykolwiek to rozgryzłeś? –

Powiązane problemy