你如何比较两个nunit测试运行的结果?(How do you compare the results of two nunit test runs?)

编程入门 行业动态 更新时间:2024-10-23 21:26:54
你如何比较两个nunit测试运行的结果?(How do you compare the results of two nunit test runs?)

我们目前有几种测试失败的情况。 有人正在研究这个问题,但不是我。 我的任务是完成其他工作。 因此,我计划在开始工作之前在NUnit中运行测试,因此我有一个基本的失败测试和失败消息。 我想使用此结果来验证那些测试在测试我自己的代码时失败并且具有完全相同的失败结果。 有没有资源可以让我这样做?

更新

我知道ExpectedException属性。 但是,对于未通过测试条件的测试,这将不起作用。 还有成千上万的测试,其中只有大约100个测试失败。 我希望有一些可以比较两次试运行的东西,并告诉我差异。

We currently have a situation where several tests are failing. Someone is working on this, but it is not me. I have been tasked with other work. So I plan on running the tests in NUnit before I begin my work so I have a base line of failing tests and what the failure message is. I would like to use this result to verify that those tests fail with the exact same failure result while testing my own code. are there any resources that would allow me to do this?

update

I'm aware of the ExpectedException attribute. However that will not work for the tests that are failing the test condition. Also there are thousands of tests of which only about 100 tests are failing. I was hoping for something that would compare the two test runs and show me the differences.

最满意答案

我扔了一个

[Ignore("SomeCustomStringICanFindLater")]

在修复失败的测试之前归因于它们。

请参见IgnoreAttribute 。

并试图说服你的经理,破坏的构建应该是每个人的首要任务。

After doing some research while waiting on an answer. I found that the console runner produces xml output. I can use a diff tool to compare the two test runs and see which tests failed differently than the baseline test run.

更多推荐

本文发布于:2023-08-01 00:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1350544.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:两个   测试   nunit   compare   test

发布评论

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

>www.elefans.com

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