参考xUnit / NUnit在测试用例中进行测试

编程入门 行业动态 更新时间:2024-10-15 04:27:39
本文介绍了参考xUnit / NUnit在测试用例中进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好@all!

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

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

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

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

请告诉我,有可能以这种方式参考xUnit / NUnit-Tests吗?或者它会成为可能吗?或者你能用最好的解决方法给我一个提示吗?我知道你(MS)更喜欢使用MSTest,但我们还没有找到像xBehave 这样的框架,使用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 (jake.ginnivan/teamcity-build-results-in-tfs/) or some tried a little hack (stackoverflow/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 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在测试用例中进行测试

本文发布于:2023-11-06 23:58:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565012.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:进行测试   测试   xUnit   NUnit   用例中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!