参考xUnit / NUnit在测试用例中进行测试 [英] Reference xUnit/NUnit Tests within a test case

查看:140
本文介绍了参考xUnit / NUnit在测试用例中进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好@all!


我们是一个小型软件开发团队,与TFS合作进行规划(scrum),版本控制和集成。因此,我们也希望通过TFS测试管理开始我们的质量保证。


过去我们为Unit.-和Integrationtests编写了大量NUnit和一些xUnit测试。考虑到这一点,我正在研究测试概念,并希望集成给定的集成测试。因此,将xUnit-Tests
引用到书面测试用例是必要的步骤。之后,应该可以通过MTM执行它们,并对产品积压项目/用户故事进行报道。


经过研究,我发现有些人遇到同样的问题。因此,存在一个开源解决方案(http://jake.ginnivan.net/teamcity-build-results-in-tfs/)或者有些尝试过一些小问题(https://stackoverflow.com/questions/25080448/nunit-与microsoft-test-manager集成)


我不太乐意使用这样的解决方案,因为当它失败时,孔系统可能会失败。 


请告诉我,有可能以这种方式参考xUnit / NUnit-Tests吗?或者它会成为可能吗?或者你能用最好的解决方法给我一个提示吗?我知道你(MS)更喜欢使用MSTest,但我们还没有找到像xBehave.net
这样的框架,使用MSTest作为基础框架。


祝你好运,


T.Hillebrand

解决方案


你可以创建一个具有相同名称的项目,命名空间,类,测试方法的通用单元测试,然后将此单元测试链接到测试用例。 (测试代理只根据相关信息查找测试程序集和测试方法)


但是,您不能通过MTM进行NUnit或XUnit测试,因为您无法指定测试适配器。您可以使用vNext版本进行测试,请参阅此博客以获取更多信息:


#使用测试计划,测试套件在Build vNext中执行自动化测试


Hi @all!

We are a small software development team, working with TFS for planing (scrum), versioning and integration. Bescause of this we would like to start our quality assurance with the TFS testmanagement also.

In the past we have written a lot of NUnit and some xUnit tests for Unit.- and Integrationtests. With this in mind I'm working on a test concept and would like to integrate the given integrationtests. So it whould be a necessary step to reference the xUnit-Tests to the written test cases. Later it should be posiible to execute them with MTM and have a coverage report to the product backlog items / user stories.

After a research I found some people having the same problems. So, an open source solution exists (http://jake.ginnivan.net/teamcity-build-results-in-tfs/) or some tried a little hack (https://stackoverflow.com/questions/25080448/nunit-integration-with-microsoft-test-manager)

I'm not very happy to use such a solution because when it fails the hole system can fail. 

Can you tell me please, it is possible to refrence xUnit/NUnit-Tests this way? Or would it become possible? Or can you give me a hint using the best workaround? I know you (MS) would prefer using MSTest, but we haven't found a framework like xBehave.net using MSTest as base-framework.

Best regards,

T.Hillebrand

解决方案

Hi,

You can create a general unit test with the same name of project, namespace, class, test method, then link this unit test to a test case. (The test agent just look for the test assembly and test method per to the associated information)

However, you can’t do NUnit or XUnit test through MTM, because you can’t specify the test adapter. You can do the test with vNext build, refer to this blogs for more information:

# Executing Automated tests in Build vNext using Test Plan, Test Suites


这篇关于参考xUnit / NUnit在测试用例中进行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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