Proposed Answer Tests don' executing

  • Friday, July 27, 2012 9:37 AM
     
     

    Suddenly tests stop executing in tfs 2010 build. Something happened with test controlles or build agents. How to resolve the problem?

    I see 3 error in event log from VSTTExecution source

    1. (MSTest.exe, PID 3724, Thread 15) ControllerExecution: Received exception calling QueueTests on agent TFS: System.Runtime.Remoting.RemotingException: Failed to write to an IPC Port: The pipe is being closed.

    Server stack trace:
       at System.Runtime.Remoting.Channels.Ipc.IpcPort.Write(Byte[] data, Int32 offset, Int32 size)
       at System.Runtime.Remoting.Channels.Ipc.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at System.Runtime.Remoting.Channels.ChunkedMemoryStream.WriteTo(Stream stream)
       at System.Runtime.Remoting.Channels.StreamHelper.CopyStream(Stream source, Stream target)
       at System.Runtime.Remoting.Channels.Ipc.IpcClientHandler.SendRequest(IMessage msg, ITransportHeaders headers, Stream contentStream)
       at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
       at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.VisualStudio.TestTools.Agent.IAgentObject.QueueTests(TestRun run, FileCopyService fileCopyService, Dictionary`2 agentSettings)
       at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.StartTestAgentRun_DoWork(TestRun run, Boolean isNewRun, FileCopyService fileCopyService, Dictionary`2 agentSettings, ICollection`1 testEnvironmentVariables)
       at Microsoft.VisualStudio.TestTools.Agent.AgentProcessManager.Microsoft.VisualStudio.TestTools.Agent.IAgentObject.QueueTests(TestRun run, FileCopyService fileCopyService, Dictionary`2 agentSettings)
       at Microsoft.VisualStudio.TestTools.Agent.RemoteAgentObjectWrapper.<>c__DisplayClass17.<QueueTests>b__16(IAgentObject agent)
       at Microsoft.VisualStudio.TestTools.Execution.RemoteObjectContainer`1.InvokeAsRemoteUser(Action`1 invoke)
       at Microsoft.VisualStudio.TestTools.Agent.RemoteAgentObjectWrapper.QueueTests(TestRun run, FileCopyService fileCopyService, Dictionary`2 agentSettings)
       at Microsoft.VisualStudio.TestTools.Controller.ControllerExecution.QueueTests(AgentMachine agent, AgentLoadDistributor loadDistributor, Int32 totalAgentCount)

    2. (MSTest.exe, PID 3724, Thread 15) ControllerExecution.CheckQueueRunToExecutionAgents: there are no valid agent machines avalable, aborting the run...

    3. (MSTest.exe, PID 3724, Thread 15) Test run 'TFSBUILD@TFS 2012-07-27 12:40:48_x86_Debug' could not be executed. No agents are marked online to execute test run.

All Replies

  • Sunday, July 29, 2012 11:21 AM
     
     Proposed Answer

    Check the status of all agents like build agents are in green colour.

    Clear the cache of TFS  and Test and try again


    Madhu Sandeep

    • Proposed As Answer by Madhu Sandeep Monday, December 10, 2012 10:07 AM
    •  
  • Tuesday, July 31, 2012 3:10 PM
     
     
  • Monday, August 06, 2012 4:52 AM
     
     

    Eventually I was sent back to this forum. :)

    I tryed to manually invoke MsTest.exe from command line (on server where builds are executing) with parameters which I got from build log and got the same error:

    Failed to queue tests for test run '<MyLogin>@TFS 2012-08-03 09:28:26_x86_Debug' on agent 'TFS': Failed to write to an IPC Port: The pipe is being closed.

    Test run <MyLogin>@TFS 2012-08-03 09:28:26_x86_Debug' could not be executed. No agents are marked online to execute test run.

    What's wrong with test agent?

    MsTest command line:

    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /nologo /usestderr /searchpathroot:"<Here is build directory>\Binaries" /resultsfileroot:"<Here is build directory>\TestResults" /testmetadata:"<Here is path to VSMDI-file>" /testlist:"Integration Tests" /testlist:"Unit Tests" /publish:"http://<IP of TFS>:8080/tfs/DefaultCollection" /publishbuild:"vstfs:///Build/Build/11848" /teamproject:"<Tfs project name>" /platform:"x86" /flavor:"Debug"

  • Tuesday, September 04, 2012 8:32 PM
     
     

    Can you execute the tests sucessfully via the following command line in the build controller? I suspect it is the permission issue.

    MSTest  /testmetadata:"<Here is path to VSMDI-file>"  /testlist:"Unit Tests"

    MSTest  /testmetadata:"<Here is path to VSMDI-file>"  /testlist:"Integration Tests"


    Ray Lin