在MTM中运行自动化脚本时出错,与TFS集成

时间:2014-10-20 05:29:09

标签: tfs microsoft-test-manager

我已使用TFS在MTM中设置了自动化测试用例。

当我构建它时,Dll也会在drop文件夹中创建,

但是当我运行测试用例时,我收到以下错误:

The test automation associated with the following test case could not be found: [994]. Run the test case again using a build that contains the binary with the test automation

无法达成解决方案,请帮助。

3 个答案:

答案 0 :(得分:1)

您需要运行tcm.exe导入,以使测试用例与dll中的测试工件保持同步。

您收到错误,因为存储在“测试用例”自动化选项卡中的详细信息与指定的DLL中的方法不匹配。

答案 1 :(得分:0)

听起来您没有将测试计划与测试版本相关联。

查看此SO文章:Couldn't run my test using Microsoft Test Manager

您还可以在此处找到一个很好的解释:Set up your test plan to use your team build

<强> [编辑]
基本上,您应该在运行测试用例时看到MTM中使用的构建版本:

enter image description here



[其他信息]
获取此类错误消息时,激活测试控制器的日志记录通常非常有用:

  1. 转到测试控制器安装目录( C:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ Common7 \ IDE )。

  2. 打开控制器配置文件( QTController.exe.config )并将跟踪级别更改为4并启用跟踪侦听器,如下所示:

  3. <configuration> 
    .....
       <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> 
    .....
       <appSettings> 
    .....
          <add key="CreateTraceListener" value="yes"/> 
       </appSettings> 
    </configuration> 
    
    1. 重新启动测试控制器服务。 ( Visual Studio测试控制器(VSTTController)
    2. 在此之后,日志文件( Vsttcontroller.log )应该在同一个安装目录中生成。

答案 2 :(得分:0)

似乎测试类或测试方法的名称发生了变化,最新版本是使用新的更改创建的,并且还与MTM测试计划相关联,但测试用例未使用更新的自动化测试进行更新,尝试将脚本中的测试方法重新关联到MTM中存在的正确测试用例。