敏捷文档框架(NTestDox?)
我正在阅读这篇博客文章: http://www.shakie.co.uk/ramblings/feature-driven-development-riding-the-waves-of-change/ 并遇到了关于 TestDox 的部分:
直接引用(因此是 PHP):
以下面的测试用例为例 示例
class InvoiceTest extends PHPUnit_Framework_TestCase
{
public function testValueIsInitiallyZero() {
$invoice = new Invoice();
$this->assertEquals(0.00, $invoice->getValue());
}
public function testWillCloseAutomaticallyIfWholeValueIsPaid() {
$invoice = Invoice::getInvoiceById(1);
$invoice->payAmount(100.00);
$this->assertEquals(true, $invoice->isClosed());
}
}
在 TestDox 格式中,这将 翻译为:
发票
[x] 值最初为零
[x]如果支付全部金额,将自动关闭
这对于某些我正在从事的项目越敏捷。 我一直在关注 TestDox 并试图追踪 NTestDox,因为我是一个 .NET 人员。
这里有 3 个问题:
有人找到 NTestDox 的副本吗? (我发现 Google 中唯一有用的结果中不存在该页面)
- http://www.emxtechnologies.com /ntestdox
- http://www.projectdistributor.net/projects/ Project.aspx?projectId=87
从单元测试生成文档是一个好的计划吗?
有谁知道 .NET 的其他框架吗?
I was reading this blog post: http://www.shakie.co.uk/ramblings/feature-driven-development-riding-the-waves-of-change/ and came across the part about TestDox:
Direct quote (hence PHP):
Take the following test case as an
example
class InvoiceTest extends PHPUnit_Framework_TestCase
{
public function testValueIsInitiallyZero() {
$invoice = new Invoice();
$this->assertEquals(0.00, $invoice->getValue());
}
public function testWillCloseAutomaticallyIfWholeValueIsPaid() {
$invoice = Invoice::getInvoiceById(1);
$invoice->payAmount(100.00);
$this->assertEquals(true, $invoice->isClosed());
}
}
In the TestDox format this would
translate to:Invoice
[x] Value is initially zero
[x] Will close automatically if whole value is paid
This would be great on some of the more agile projects I'm working on. I've been looking at TestDox and trying to track down NTestDox as I'm a .NET guy.
3 questions in one here:
Anyone find a copy of NTestDox? (I'm seeing page does not exist on the only useful results in google)
- http://www.emxtechnologies.com/ntestdox
- http://www.projectdistributor.net/projects/Project.aspx?projectId=87
Is generating documentation from your Unit tests a good plan?
Does anyone know of any other frameworks for .NET?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
遗憾的是,对于 NTestDox,我无法帮助您,但尽管如此,我还是想回答您的最后两个问题。
我不知道记录现有的单元测试是否会对您有任何好处。 然而,如果您打算开发测试驱动,那么能够使用人类可读的规范作为测试框架的一部分是有价值的。 看看 BDD 和 ATDD。
这引出了你的第二个问题:
如果您寻求 BDD 的优势,而不是从测试中生成文档,您可以查看 Cucumber。 它应该可以与 .NET 一起使用(请参阅文档此处)。
With NTestDox I unfortunately can't help you, but nevertheless I'd like to answer your last two questions.
Whether documenting exiting unit tests will do you any good, I do not know. There is however value to be had from being able to use human readable specifications as part of your test framework if you intend to develop test-driven. Have a look at BDD and ATDD.
This leads to your second question:
If you look for the benefits of BDD instead of generating documentation from your tests, you could have a look at Cucumber. It should be usable with .NET (see documentation here).
我也找不到 NTestDox 的任何可用痕迹。
不过,我确实找到了 2010 年初的 nAgileDox 和 TestDox for .NET。
虽然 Chris Stevenson 的页面< sourceforge 上的一个 href="http://agiledox.sourceforge.net/" rel="nofollow noreferrer">AgileDox 项目只提到了他 2003 年为 JUnit 开发的 TestDox Java 程序,该项目的 CVS 存储库 还包含带有控制台版本和 GUI 版本的 nAgileDox C# 程序。 它的最后一次更新是从 2007 年开始的。源代码和可执行文件可在 此目录。
nAgileDox 和 TestDox for .NET 都通过读取 .net 程序集来工作。
另请参阅此相关问题。
I can't find any usable traces of NTestDox either.
However I did find nAgileDox and TestDox for .NET which is from early 2010.
Although the pages of Chris Stevenson's AgileDox project at sourceforge only mention his TestDox Java program for JUnit from 2003, the project's CVS repository also contains the nAgileDox C# program with a Console version and a GUI version. Its last update is from 2007. Source and executables are available in the files nAgileSource.zip and nAgileComplete.zip from this directory.
Both nAgileDox and TestDox for .NET work by reading .net assemblies.
See also this related question.