从TFS构建系统中手动运行测试 [英] Running tests manually from within TFS build system

查看:87
本文介绍了从TFS构建系统中手动运行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我的构建定义中有两个构建步骤,它们按顺序运行Visual Studio Test for Debug和Release。

I have two build steps in my build definition that sequentially runs Visual Studio Test for Debug and Release.

我想:

  *同时运行这两个步骤,捕获输出和退出状态到文件

  * Run these two steps at the same time, capturing the output and exit status to files

  *等待状态代码文件存在,将捕获的输出显示到控制台

  * Wait for the status code files to exist, display the captured output to the console

我有:

  *运行单个测试的批处理文件,捕获输出并将状态代码存储到文件

  * A batch file that runs a single test, captures the output and stores the status code to file

  *批处理文件同时为Debug和Release运行上述脚本,并等待进程完成

  * A batch file that runs the above script for both Debug and Release at the same time, and waits for the processes to finish

我是什么需要:

 我想手动启动TFS Visual Studio Build步骤

 I way to manually start the TFS Visual Studio Build step

测试是谷歌测试可执行文件,在TFS中它们运行时一个运行设置文件,并启用了覆盖范围。

The tests are google test executables, in TFS they are run with a Run Settings File, and coverage is enabled.

我希望这有点清楚,我对TFS很新,可能已经使用了地方错误的术语。

I hope this was somewhat clear, I am very new to TFS and might have used the wrong terminology in places.

问候,

甚至

推荐答案

Hi EvenAn ,

Hi EvenAn,

感谢您发布此处。

根据您的描述,我认为您应该使用批处理脚本任务来运行您的第二个批处理文件,然后您可以在任务完成后获取状态代码文件。然后使用另一个批处理脚本任务运行新的批处理文件以将输出捕获到控制台的
,您可以使用以下命令:

According to your description, I think you should use the Batch Script task to run your second batch file, then you could get the status code file after the task is finished. Then use another Batch Script task to run a new batch file to capture output to the console, you could use the following command:

键入C:\Users \Administrator \Desktop\Test.txt

type C:\Users\Administrator\Desktop\Test.txt

然后,您可以在任务完成后在构建控制台中看到文本文件的内容。

Then you could see the content of the text file in the build console after the task is finished.

但是您无法手动启动Visual Studio Build任务,所有任务将在构建开始后按顺序执行。

But you could not start the Visual Studio Build task manually, all the tasks will be executed in order after the build starts.

最好的问候

Limitxiao Gao

Limitxiao Gao


这篇关于从TFS构建系统中手动运行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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