长时间运行的单元测试标记为已通过TFS构建失败-对象'xxx.rem'已断开连接或在服务器上不存在.** [英] Long running unit test marked as passed fails TFS build - Object 'xxx.rem' has been disconnected or does not exist at the server.**

查看:89
本文介绍了长时间运行的单元测试标记为已通过TFS构建失败-对象'xxx.rem'已断开连接或在服务器上不存在.**的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想利用TFS和MSTest进行回归测试.我有一些长时间运行的单元测试( 10+分钟).单元测试可以在VS2017内的开发人员机器上本地成功运行.单元测试显示为在TFS2017上通过的.但是,该构建被标记为失败.在我看来,这个问题似乎在执行者和单元测试之间超时.有没有办法增加TFS中的超时设置?还有其他想法可以修复吗?

I want to utilize TFS and MSTest for regression testing. I have a few long running unit tests (10+ minutes). The unit tests can be run successfully locally on developer's machine inside VS2017. The unit test were shown as passed on TFS2017. However the build was marked as failed. This problem looks like a timeout to me between the executor and the unit test. Is there a way to increase the timeout setting in TFS? Any other ideas to fix the build?

2017-11-28T14:01:00.8504854Z ## [错误]错误:调用执行程序'executor://mstestadapter/v2'时发生异常:对象'/fe158daa_975c_4c26_818d_b79d26604456/ekqkfvms170qdx3bql9dzzy2_318.断开连接或在服务器上不存在.

2017-11-28T14:01:00.8504854Z ##[error]Error: An exception occurred while invoking executor 'executor://mstestadapter/v2': Object '/fe158daa_975c_4c26_818d_b79d26604456/ekqkfvms170qdx3bql9dzzy2_318.rem' has been disconnected or does not exist at the server.

推荐答案

检查在构建代理程序计算机上安装的Visual Studio 2017的确切版本是什么.似乎早期版本的MSTest.TestAdapterMSTest.TestFramework上存在问题.基于此线程,该问题已修复,可以在v1.1.13中找到.

Check what's exact version of Visual Studio 2017 do you installed on the build agent machine. Seems there's an issue on the MSTest.TestAdapter and MSTest.TestFramework on earlier version. Based on this thread the issue has been fixed and it's available in v1.1.13.

请参阅github错误:运行测试间歇性失败,并与服务器异常断开连接.

See the github bug: Run tests fail intermittently with a disconnected from server exception.

请尝试以下项目解决此问题:

Please try below items to fix that:

以下还有相关问题供您参考:

Also below related issues for your reference:

  • https://github.com/Microsoft/testfx/issues/177
  • https://github.com/Microsoft/testfx/issues/194

这篇关于长时间运行的单元测试标记为已通过TFS构建失败-对象'xxx.rem'已断开连接或在服务器上不存在.**的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆