敏捷文档框架(NTestDox?)

发布于 2024-07-14 10:21:33 字数 1536 浏览 6 评论 0原文

我正在阅读这篇博客文章: 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 中唯一有用的结果中不存在该页面)

从单元测试生成文档是一个好的计划吗?

有谁知道 .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)

Is generating documentation from your Unit tests a good plan?

Does anyone know of any other frameworks for .NET?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻找一个思念的角度 2024-07-21 10:21:33

遗憾的是,对于 NTestDox,我无法帮助您,但尽管如此,我还是想回答您的最后两个问题。

从单元测试中生成文档是一个好的计划吗?

我不知道记录现有的单元测试是否会对您有任何好处。 然而,如果您打算开发测试驱动,那么能够使用人类可读的规范作为测试框架的一部分是有价值的。 看看 BDDATDD

这引出了你的第二个问题:

有人知道 .NET 的其他框架吗?

如果您寻求 BDD 的优势,而不是从测试中生成文档,您可以查看 Cucumber。 它应该可以与 .NET 一起使用(请参阅文档此处)。

With NTestDox I unfortunately can't help you, but nevertheless I'd like to answer your last two questions.

Is generating documentation from your Unit tests a good plan?

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:

Does anyone know of any other frameworks for .NET?

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).

肥爪爪 2024-07-21 10:21:33

我也找不到 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文