aseemb's blog

  • How to enable test controller logs

    Here are the steps which you should perform to enable test controller logs.

    1. Go to your test controller installation directory (typically it is something like C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\).

    2. Open the controller configuration file (QTController.exe.config) and change the trace level to 4 and enable the trace listener as shown below:

      <system.diagnostics>
        <switches>
          <!-- You must use integral values for "value".
               Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. -->
          <add name="EqtTraceLevel" value="4" />
        </switches>
      </system.diagnostics> 

    .....

        <add key="CreateTraceListener" value="yes"/>
      </appSettings>
    </configuration>

    3. Restart the test controller service.

    After this the log file (Vsttcontroller.log) should get generated in the same installation directory.

  • How to create ‘testing enabled’ lab environment

    In this post, I plan to talk about how you can create ‘testing enabled’ lab environment. I am assuming that you have already configured lab management and have a ‘lab ready virtual machine’ in your SCVMM library, but if you have not done any of that, please do that as mentioned in the first 2 posts of ‘Getting Started with Lab Management’ series at team blog here and here.

    Now let us now go through the steps which you should follow to create a ‘testing enabled’ lab environment.

    1. Open Microsoft Test and Lab Manager (mtlm.exe).

    Microsoft Test and Lab Manager

    2. Connect to your team project.

    ConnectToProject

    3. Go to Lab center.

    GoToLabCenter

    LabCenterContinue

    LabCenterWithoutLabEnvironment

    4.  To create the environment, Select new virtual environment which will open the new environment creation wizard.

    NewVirtualEnvironment

    5. On name and location page, enter environment name, its description.

    NameAndDescription

    6. On machines page, add the machines which you should be part of the environment. But as we have not imported any virtual machine/template into our team project, so there is no available virtual machine. Let us import one into the team project. To do that click ‘import’ .

    BeforeImport

    In the import wizard, import the virtual machine from your library location and complete it.

    ImportVM

    7. Now you will notice that a machine is available in this project. Add this virtual machine to your lab environment. (You can add multiple machines into your environment as well as the same machine multiple times but for simplicity, we are adding only one machine)

    Add Machine

    8. Leave the Machine Properties page as default and go to capability page.

    9. On capability page, enable testing capability on your lab environment. This selection will make your lab environment a ‘test ready’ environment and will enable you to run manual as well as automated tests on this lab environment.

    EnableTestingCapability

    9. Check the summary of the environment and ensure that testing capability is enabled and start the creation of lab environment. This will finish the environment creation wizard and you will go to lab center.

    SummaryPage

    10. In lab center, you will notice that creation of lab environment is in progress and testing capability is not ready (which is expected as environment is not yet created).

    EnvironmentCreationInProgress

    11. Once environment is created, start the lab environment.

    12. Once the environment goes to running state, wait for machine to initialize and after some time you will notice that testing capability has turned green.

    TestingCapabilityIsReady

    Congratulations!! You have successfully created a testing enabled lab environment and are now ready to run manual tests or automated tests.

  • TF267055: The machine is not ready to run tests because of the following error: Unable to connect to the controller on 'aseemb-tc.fareast.corp.microsoft.com:6901'. The agent can connect to the controller but the controller cannot connect to the agent becau

    In Visual Studio Team Lab Management, the above error message is observed on a testing capability enabled lab system when the lab system had lost trust relationship with the domain. To confirm that this is indeed the case, do the following.

    1. Log-in to the test controller machine.

    2. Try to open a file share for the lab system from the test controller machine. (If trust relationship is the problem, then you will not be able to open the file share and it will fail with trust relationship error)

    To come out of this error, rejoin (unjoin first and join it back) the lab system back to the domain.

  • Error starting the test run: Build directory of the test run is not specified or does not exist.

    In Microsoft Test and Lab Manager, the above error message is observed during the execution of an automated test run on a test controller. It can occur in either of the following conditions.

    1. The account under which test controller is running does not have read permission on the build directory. (The build directory is same as the drop location of build associated with this test run.)

    2. The build directory itself does not exist.

    So to come out of this error, ensure that build directory exists and test controller service account has read permission on it.

  • System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 172.22.221.228:6901

    In Visual Studio Team Lab Management Beta2, the above error message is normally observed on a testing capability enabled lab environment/lab system when firewall service is blocking the calls to test controller. To resolve this, ensure that firewall exception for test controller is added properly in the firewall exception list.

  • The agent can connect to the controller but the controller cannot connect to the agent because of following reason: The server has rejected the client credentials. The logon attempt failed

    In Visual Studio Team Lab Management Beta2, the above error message is observed on a testing capability enabled lab environment/lab system when the service account for test controller/agent are not properly configured. 

    In this case, following error will be observed in the logs of failing test agent.

    I, 3436, 4, 2009/11/12, 16:14:19.435, ASEEMB-TA8\QTAgentService.exe, AgentService: Failed to connect to controller. Microsoft.VisualStudio.TestTools.Exceptions.EqtException: The agent can connect to the controller but the controller cannot connect to the agent because of following reason: The server has rejected the client credentials.
    The logon attempt failed

    Server stack trace:
       at Microsoft.VisualStudio.TestTools.Controller.AgentMachine.VerifyAgentConnection(Int32 timeout)
       at Microsoft.VisualStudio.TestTools.Controller.AgentManager.BeforeConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentService)
       at Microsoft.VisualStudio.TestTools.Controller.ControllerConfiguration.ConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentService)
       at Microsoft.VisualStudio.TestTools.Controller.ControllerObject.ConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentService)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

    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.Controller.IControllerCallback.ConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentObject)
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.ConnectToController(Boolean shouldThrow)

    This error can occur in any of the following conditions: -

    1. The account under which test controller is running is not known to the test agent machine. i.e. if test controller is running under a local machine account, then the corresponding shadow account (same username/same password) does not exist on the test agent machine.

    2. The test controller is running under a local machine account which is shadowed on test agent machine, but while creation of this account on test agent machine, “User must change password at next logon” property was enabled.

    newUser

    This essentially means that the password for the shadowed account has actually expired and test controller cannot connect to test agent unless the password is changed or the account is recreated with this property unchecked.

    3. The test agent is running on windows xp machine and force guest policy is on.

  • Could not register TCP channel: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted

    I have observed the above error message a couple of times on windows xp machines when the test agent service is restarted. The service does not start due to this error and in test agent log file following stack trace is observed.

    ASEEMB-SPEARHEA\QTAgentService.exe, AgentService: Could not register TCP channel: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted
       at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.Net.Sockets.TcpListener.Start(Int32 backlog)
       at System.Net.Sockets.TcpListener.Start()
       at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
       at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.RegisterTcpChannel(String bindToSpecificAddress)
    E, 1880, 4, 2009/10/28, 07:05:57.868, ASEEMB-SPEARHEA\QTAgentService.exe, AgentService: Exception occurred while publishing AgentService object. Microsoft.VisualStudio.TestTools.Exceptions.EqtException: Could not register channel on port 6910. Only one usage of each socket address (protocol/network address/port) is normally permitted
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.RegisterTcpChannel(String bindToSpecificAddress)
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.CreateChannels(String bindToSpecificAddress)
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.OnStart(String[] args)
    E, 1880, 4, 2009/10/28, 07:05:58.040, ASEEMB-SPEARHEA\QTAgentService.exe, AgentServiceBase: Exception occurred while starting AgentService. Microsoft.VisualStudio.TestTools.Exceptions.EqtException: Test agent service could not register with the test controller. Could not register channel on port 6910. Only one usage of each socket address (protocol/network address/port) is normally permitted
       at Microsoft.VisualStudio.TestTools.Agent.AgentService.OnStart(String[] args)
       at Microsoft.VisualStudio.TestTools.Agent.AgentServiceWrapper.OnStart(String[] args)
       at Microsoft.VisualStudio.TestTools.Agent.AgentServiceBase.OnStart(String[] args)
    I, 1880, 1, 2009/10/28, 07:05:58.681, ASEEMB-SPEARHEA\QTAgentService.exe, AgentServiceBase: exiting.

    This error seems to indicate that the socket on which test agent wants to listen is not available, probably because the old socket was not closed properly by the underlying layers. To come out of this error, I just restart the machine & it works. 


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker