是否可以自定义 NUnit XML 输出? [英] Is it possible to customize NUnit XML output?

查看:65
本文介绍了是否可以自定义 NUnit XML 输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在查看 NUnit XML 输出,想知道是否可以生成仅针对失败的输出.

我的意思是,如果测试通过 OK,则根本不会为其生成 XML 输出.

XSLT 在这里不是一个选项.我根本不希望通过测试的 XML 输出:如果我不需要有关通过测试的详细信息,我不希望系统花时间生成这些详细信息.*

这个想法是,如果您进行大量测试,XML 输出往往会非常大,但无论如何,80% 的时间您都会遇到失败.对于这种情况,我希望以只生成失败信息的方式运行我的测试.

解决方案

我将此问题发布到 NUnit Google 网上论坛组和查理普尔确认没有这样的选择.

I'm looking at NUnit XML output right now and wonder if it's possible to generate the output for failures only.

I mean, if a test passes OK, no XML output gets generated for it at all.

XSLT is not an option here. I don't want XML output for passed tests at all: if I don't need the details about the passed tests, I don't want the system to spend time generating those details.*

The idea is, XML output tend to be quite large if you have a lot of tests, but 80% of the time you're after failures anyway. For such cases, I'd like to run my tests in such a way that only information on failures get generated.

解决方案

I posted this question to the NUnit Google Groups group, and Charlie Poole confirmed that there's no such option.

这篇关于是否可以自定义 NUnit XML 输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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