我正在嘗試將WPF應用程序功能測試集成到TFS CI中,並且這隻能部分工作。只有當用戶登錄到測試框時才運行TFS功能測試
在TFS構建定義中,有步驟Visual Studio Test Agent Deployment
和Run Functional Tests
。代理被配置爲以交互式進程運行。只有當某人登錄到測試服務器並實際看到屏幕時,所有功能纔有效。從服務器註銷後,CI會卡住Deploy TestAgent
步驟的任務ConfigureTestAgent
(請參閱下面的日誌)。
代理以與用於RDP的憑據相同的憑據運行到測試框。究竟是什麼故障 - 與TFS服務器或其他東西的通信?
功能測試卡住具有以下控制檯日誌:
Starting task: Deploy TestAgent on dpp02
******************************************************************************
Executing the powershell script: c:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\DeployTestAgent.ps1
DistributedTests: Starting to deploy and configure test agent on test machines.
DistributedTests: Inputs provided are:
DistributedTests: Username: ts\aak
DistributedTests: Use HTTP Port: True
DistributedTests: Run as process: True
DistributedTests: Login Automatically: True
DistributedTests: Disable Screen saver: True
DistributedTests: Agent would be downloaded from http://go.microsoft.com/fwlink/?LinkId=615472
DistributedTests: Update test agent: True
DistributedTests: Run test agent as DataCollection only : False
DistributedTests: Path to script that installs test agent on remote machine: C:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\TestAgentInstall.ps1
DistributedTests: Path to script that configures test agent on remote machine: C:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\TestAgentConfiguration.ps1
DistributedTests: Path to script that downloads test agent on azure remote machines : C:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\DownloadTestAgent.ps1
DistributedTests: Path to script that checks if test agent is installed on remote machine: C:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\CheckTestAgentInstallation.ps1
DistributedTests: Path to script that checks if test agent is already running on remote machine: C:\Agent\tasks\DeployVisualStudioTestAgent\1.0.25\VerifyTestMachinesAreInUse.ps1
DistributedTests: Task 'VerifyTestMachinesAreInUse' on machine 'dpp02:5985' is being run
DistributedTests: Task 'VerifyTestMachinesAreInUse' on machine 'dpp02:5985' completed.
DistributedTests: Starting to download testagent
DistributedTests: testagent is downloaded at: C:\Users\aak\AppData\Local\Temp\34b091f9-093d-46cd-8635-3a1164d777fe
DistributedTests: Task 'CopyFilesToTestAgent' on machine 'dpp02:5985' is being run
DistributedTests: Task 'CopyFilesToTestAgent' on machine 'dpp02:5985' completed.
DistributedTests: Task 'DeployTestAgent' on machine 'dpp02:5985' is being run
DistributedTests: Task 'DeployTestAgent' on machine 'dpp02:5985' completed.
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is being run
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DistributedTests: Task 'ConfigureTestAgent' on machine 'dpp02:5985' is taking time. Please Wait
DTAExecutionHost.exe.log有這樣的:
V, 7096, 16, 2017/08/09, 17:52:52.016, DPP02\DTAExecutionHost, TestExecutionServiceCommandQueueListener:DispatchAsync
I, 7096, 16, 2017/08/09, 17:52:52.017, DPP02\DTAExecutionHost, ExecutionTaskStateModel.ListenerCommandReceived : Requesting a stop on Stop command.
I, 7096, 16, 2017/08/09, 17:52:52.017, DPP02\DTAExecutionHost, TestExecutionServiceCommandQueueListener.DispatchAsync : Stop listening on Stop command.
I, 7096, 6, 2017/08/09, 17:52:52.017, DPP02\DTAExecutionHost, ExecutionTaskStateModel.RunStateTransitionsAsync : The task was cancelled
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removing agent setting RegisteredAgentIdOnTfs on agent machine
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removing agent setting RegisteredAgentIdOnTfs on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removed agent setting RegisteredAgentIdOnTfs on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removing agent setting RegisteredAgentIdOnTfs on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removed agent setting RegisteredAgentIdOnTfs on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removing agent setting TfsUrl on agent machine
I, 7096, 6, 2017/08/09, 17:52:52.022, DPP02\DTAExecutionHost, Removing agent setting TfsUrl on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removed agent setting TfsUrl on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting TfsUrl on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removed agent setting TfsUrl on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting DtlEnvUrl on agent machine
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting DtlEnvUrl on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removed agent setting DtlEnvUrl on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting DtlEnvUrl on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removed agent setting DtlEnvUrl on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting DtlMachineName on agent machine
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removing agent setting DtlMachineName on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.023, DPP02\DTAExecutionHost, Removed agent setting DtlMachineName on agent machine - 32 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.024, DPP02\DTAExecutionHost, Removing agent setting DtlMachineName on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.024, DPP02\DTAExecutionHost, Removed agent setting DtlMachineName on agent machine - 64 bit hive
I, 7096, 6, 2017/08/09, 17:52:52.024, DPP02\DTAExecutionHost, ExecutionHost.UnregisterFromServer : Agent is unregistering from server.
Web method running: [http://tfs01:8080/tfs/XRX%20Projects/_apis/test/Agents/33] (DELETE)33[test]
Web method response: [http://tfs01:8080/tfs/XRX%20Projects/_apis/test/Agents/33] (DELETE)33[test] 43 ms
I, 312, 1, 2017/08/09, 17:55:23.897, 24814877456, DTAExecutionHost.exe, Main.TryReadAndCacheVssCredentials Acquiring the Token Info
I, 312, 1, 2017/08/09, 17:55:23.916, 24814914498, DTAExecutionHost.exe, Communicating to the Token Servicehttp://tfs01:8080/tfs/XRX%20Projects
W, 312, 1, 2017/08/09, 17:55:23.998, 24815107475, DTAExecutionHost.exe, Service task failed. Retry attempt 10.
I, 2324, 1, 2017/08/09, 17:59:39.692, 467469870, DTAExecutionHost.exe, Main.TryReadAndCacheVssCredentials Acquiring the Token Info
I, 2324, 1, 2017/08/09, 17:59:39.723, 467537817, DTAExecutionHost.exe, Communicating to the Token Servicehttp://tfs01:8080/tfs/XRX%20Projects
I, 3240, 1, 2017/08/09, 18:02:03.753, 382139782, DTAExecutionHost.exe, Main.TryReadAndCacheVssCredentials Acquiring the Token Info
I, 3240, 1, 2017/08/09, 18:02:03.769, 382166680, DTAExecutionHost.exe, Communicating to the Token Servicehttp://tfs01:8080/tfs/XRX%20Projects
I, 1288, 1, 2017/08/09, 18:06:12.974, 462638694, DTAExecutionHost.exe, Main.TryReadAndCacheVssCredentials Acquiring the Token Info
I, 1288, 1, 2017/08/09, 18:06:12.990, 462666317, DTAExecutionHost.exe, Communicating to the Token Servicehttp://tfs01:8080/tfs/XRX%20Projects
I, 3908, 1, 2017/08/09, 18:08:09.827, 238326434, DTAExecutionHost.exe, Main.TryReadAndCacheVssCredentials Acquiring the Token Info
謝謝。禁用GPO解決了這個問題 – lekso