我正在尝试将WPF应用程序功能测试集成到TFS CI中,这只是部分工作。
在TFS构建定义中,有require 'rubygems'
require 'data_mapper'
require 'dm-sqlite-adapter'
require 'bcrypt'
DataMapper.setup(:default, "sqlite:test.db")
class User
include DataMapper::Resource
property :id, Serial, :key => true
property :username, String, :length => 3..50
property :password, BCryptHash
end
DataMapper.finalize
DataMapper.auto_upgrade!
和Visual Studio Test Agent Deployment
步骤。代理程序配置为作为交互式进程运行。只有当有人登录测试服务器并实际看到屏幕时,一切都有效。从服务器注销后,CI会卡在Run Functional Tests
步骤ConfigureTestAgent
的任务中(请参阅下面的日志)。
代理程序在与用于RDP的测试框相同的凭据下运行。究竟什么是失败的 - 与TFS服务器或其他什么的通信?
功能测试卡在以下控制台日志中:
Deploy TestAgent
DTAExecutionHost.exe.log包含:
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
答案 0 :(得分:0)
当计算机上的组策略重置测试执行所需的Autologon注册表项时,通常会发生此问题,而部署测试代理步骤会尝试设置此注册表项。
要使Test代理以交互方式运行,我们需要在框中有一个有效的用户会话,如果该会话不存在,则通过自动登录创建该会话。
因此,请检查您是否为测试计算机启用了自动登录,或者任何组策略都限制了自动登录。
请尝试以下方法来缩小问题范围:
如果您之前已成功完成测试,请尝试 重新启动测试计算机并取消选中“更新测试代理” “高级”(默认情况下已选中并强制重新安装TA 每次)。
如果之前未执行,您可以尝试下载测试代理 2015年,然后手动将其安装在该机器上并检查结果。
如果这不起作用,请尝试:
另一方面,您可能会尝试找另一台测试机来测试是否可以在其上部署测试代理。