TFS2015中的测试报告自定义 [英] Test Report Customization in TFS2015

查看:66
本文介绍了TFS2015中的测试报告自定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello


TFS2015测试中是否有任何测试报告自定义界面?


我知道可以定义功能测试像构建定义一样运行定义并运行自动化测试用例。可以获得测试运行结果,这是一个运行ID我可以从超链接打开它。 


我知道可以在MTM中编辑手动测试用例来定义手动测试完成后,我可以在测试计划中将其标记为通过。


有没有办法将所有测试结果都放到自动化运行结果和手动结果以一种形式制作综合报告?



谢谢


Recho

解决方案

嗨Recho,


有excel报告,但可能不符合您的要求。


#使用测试透视图分析并报告测试结果


另一种方法是使用TFS REST API手动构建报告。


#Test results


<使用
Microsoft Team Foundation Server扩展客户端
调用REST API的C#代码:

 var u = new Uri(" [tfs collection url]"); 
VssCredentials c = new VssCredentials(new Microsoft.VisualStudio.Services.Common.WindowsCredential(new NetworkCredential(" XXX"," XXX"))));
var connection = new VssConnection(u,c);
var testClient = connection.GetClient< TestManagementHttpClient>();
string teamProject =" scrum2015" ;;
var results = testClient.GetTestResultsAsync(teamProject,117).Result;


问候


Starain


Hello

Is there any test report customization interface in TFS2015 testing?

I know it is possible to define a functional test run definition like the build definition and run the automated test cases. it is possible to get the test run result which is a run ID I can open it from a hyperlink. 

I know it is available to edit the manual test case in MTM to define the manual step in it, once the manual test completes, I can mark it as pass in the test plan.

Is there any way to put all the test results for both automation run result and manual result in one form to make a comprehensive report?

Thanks

Recho

解决方案

Hi Recho,

There is the excel report, but may not meet your requirement.

# Analyze and report on test results using the test perspective

Another way is that you can build the report manually by using TFS REST API.

# Test results

C# code to call REST API with Microsoft Team Foundation Server Extended Client:

 var u = new Uri("[tfs collection url]");
            VssCredentials c = new VssCredentials(new Microsoft.VisualStudio.Services.Common.WindowsCredential(new NetworkCredential("XXX", "XXX")));
            var connection = new VssConnection(u, c);
            var testClient = connection.GetClient<TestManagementHttpClient>();
           string teamProject = "scrum2015";
           var results= testClient.GetTestResultsAsync(teamProject, 117).Result;

Regards

Starain


这篇关于TFS2015中的测试报告自定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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