编码 UI 测试更改用户导致 FatalExecutionEngineError 返回 AgentRestart.dat

Coded UI Test change user causes FatalExecutionEngineError returning a AgentRestart.dat

问题: 我是 运行 编码 UI 测试 CUITe 在 C# VS 2012 更新中。 QA 代理正在摔倒并生成 dat 文件

运行 在调试模式下 它成功打开 IE 浏览器 window ,登录,尝试在组合框中更改用户。这些名称的格式为 'Mr First Last (username)'

CUITe_HtmlComboBox cboUsers = bw.Get<HtmlComboBox>("Id~user");
string terminatingString = ")";
int i = -1;
foreach(string userPart in cboUsers.Items) //'Mr'
{
    if(userPart.EndsWith(terminatingString))
    {    
        if(userPart.Contains("username"))
            cboUsers.SelectItem(i);
        i++;
    }

}

日志 在调试期间 VS 会抛出这个

FatalExecutionEngineError was detected
Message: The runtime has encountered a fatal error. 
The address of the error was at 0x69c08d3b, on thread 0x1410. 
The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. 
Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

运行 到 MSTest.exe 有一个 AgentRestart.dat 如下(为

道歉
    ÿÿÿÿ          sMicrosoft.VisualStudio.QualityTools.AgentObject, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a   7Microsoft.VisualStudio.TestTools.Agent.AgentRestartInfo   m_runIdm_testsCompleted System.Guid   ýÿÿÿSystem.Guid   _a_b_c_d_e_f_g_h_i_j_k           ÂTíÚi©D¹È›ë¤÷    

我正在使用托管调试助手。由于调试是在测试资源管理器中完成的,因此可能不会调用它。我已将代码保持在最低限度,如果需要会包含更多代码

找到答案,无法连接到 data source

的 telnet ip 端口