将C#单元测试名称转换为英语(testdox样式) [英] Convert C# unit test names to English (testdox style)

查看:116
本文介绍了将C#单元测试名称转换为英语(testdox样式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆用MbUnit编写的单元测试,我想从测试名称生成简单的英语句子.这里介绍了这个概念:

I have a whole bunch of unit tests written in MbUnit and I would like to generate plain English sentences from test names. The concept is introduced here:

http://dannorth.net/introducing-bdd

这是来自文章:

public class CustomerLookupTest extends TestCase {
    testFindsCustomerById() {
        ...
    }
    testFailsForDuplicateCustomers() {
        ...
    }
    ...
}

提供类似这样的内容:


CustomerLookup
- finds customer by id
- fails for duplicate customers
- ...

不幸的是,以上文章(testdox)中引用的工具是基于Java的. .NET是否有一个?

Unfortunately the tool quoted in the above article (testdox) is Java based. Is there one for .NET?

这样的声音写起来很简单,但是我根本没有带宽,想使用已经写好的东西.

Sounds like this would be something pretty simple to write, but I simply don't have the bandwidth and want to use something already written.

编辑:只是为了阐明问题.我正在寻找可以通过现有测试将CamelCase函数名称转换为句子的东西.对于某些Gallio插件来说,这似乎是一项完美的工作.

Just to clarify the question. I am looking at something that can whiz through existing tests and convert CamelCase function names into sentences. Seems like a perfect job for some sort of Gallio plugin.

到目前为止,我以某种方式找到了 SpecUnit ,而Jay建议使用BDDDoc.这两个都是行为验证框架,将需要大量重写现有测试.我们的团队已决定将SpecFlow作为主要的BDD框架使用,而我试图实现的目标是生成一份有关现有测试的报告,以了解它是否适​​合BDD方法.

So far I somehow found SpecUnit and Jay has suggested BDDDoc. Both of those are behaviour verification frameworks that will require a significant rewrite of the exisitng tests. Our team has made the decision to go with SpecFlow as a main BDD framework and what I was trying to achieve is to generate a report of the existing tests to see how well it fits the BDD approach.

推荐答案

.net中有一个 TestDox 看来是最近的一年(2010年).

There is a TestDox for .NET It seems fairly recent (2010).

这篇关于将C#单元测试名称转换为英语(testdox样式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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