如何将TestExecute / TestComplete结果导出到teamcity? [英] How to export TestExecute/TestComplete results to teamcity?

查看:321
本文介绍了如何将TestExecute / TestComplete结果导出到teamcity?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用团队中的命令行构建步骤通过批处理文件运行测试完成测试。测试运行正常,但是我没有看到有关teamcity中通过/失败测试的任何信息。基本上TestComplete在运行测试后会生成一些日志文件。但是我不知道如何将这些文件放到teamcity并显示为测试结果。



我试图关注这个 http://community.smartbear。 com / forum / post /?mode = singleThread& thread = ca03299b-97e2-47a7-b634-e0102c6f5761 ,但它描述了使用MSBuild而不是命令行运行测试。想知道测试结果是否可以通过命令行输出到teamcity。



此外,我还试图添加自定义标签到teamcity项目配置,如这里所述
http://confluence.jetbrains.net/display/TCD65/Including+Third-Party+Reports+in+the+the + Build + Results 。但是该选项卡不在该项目的任何构建配置中。

解决方案

您可以使用teamcity服务消息来实现报告您正在寻找的测试。服务消息是TeamCity在构建结果中识别和报告的简单格式化输出(您写入标准输出)。您可以轻松地报告测试开始,结束和可选失败,所有这些团队将在其GUI中显示。例如:



teamcity [testStarted name ='testname']



/ p>

teamcity [testFinished name ='testname'duration ='1000']



Teamcity将承担测试通过,除非您输出## teamcity [testFailed name ='testname']消息。



有关详细信息,请参阅 http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity# BuildScriptInteractionwithTeamCity-ServiceMessages 。查看报告测试部分。


I am using commandline build step in teamcity to run the testcomplete tests via a batch file.The tests are running fine,but I do not see any information regarding the passed/failed tests in teamcity. Basically TestComplete generates some log files after running the tests.But I am not sure how to get these files to teamcity and display it as test results.

I tried to follow this http://community.smartbear.com/forum/post/?mode=singleThread&thread=ca03299b-97e2-47a7-b634-e0102c6f5761 , but it describes using MSBuild instead of commandline to run the tests. Wondering if the test results can be exported to teamcity via commandline as well.

Also I tried to add a custom tab to teamcity project configuration as mentioned here http://confluence.jetbrains.net/display/TCD65/Including+Third-Party+Reports+in+the+Build+Results . But that tab does not in any of the build configurations under that project.

解决方案

You can use teamcity Service Messages to achieve the reporting of tests that you are looking for. Service Messages are simply formatted output (that you write to standard output) that teamcity recognises and reports in the build results. You can easily report when a test started, ended and optionally failed, all of which teamcity will display in its GUI. For example:

teamcity[testStarted name='testname']

More test output should you want any

teamcity[testFinished name='testname' duration='1000']

Teamcity will assume the test passed, unless you output a ##teamcity[testFailed name='testname'] message.

For more information, see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages. Look at the Reporting Tests section.

这篇关于如何将TestExecute / TestComplete结果导出到teamcity?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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