gpt4 book ai didi

unit-testing - 下一步是编辑触发测试吗?

转载 作者:行者123 更新时间:2023-11-28 19:45:17 25 4
gpt4 key购买 nike

我刚读完 Michael C. Feathers 的好书 Working Effectively with Legacy Code ,将测试引入遗留代码的圣经。在这本书中,他描述了一种称为编辑触发的测试的东西:

If it isn't out by the time this book is released, I suspect that someone will soon develop an IDE that allows you to specify a set of tests that will run at every keystroke. It would be an incredible way of closing the feedback loop.

It has to happen. It just seems inevitable. There are already IDEs that check syntax on each keystroke and change the color of code when there are erros. Edit-triggered testing is the next step.

当我读到这篇文章时,我还没有听说过任何支持它的 IDE 或工具。但是,我刚刚找到一个名为 Infinitest 的项目支持 Java 的这一点。

我的问题是:

  1. 是否有任何其他工具/框架支持此功能(希望也适用于 Visual Studio)?
  2. 您对这种测试有什么经验(效率高,减慢 IDE 等)?
  3. 这是 TDD 的下一步吗?

更新:

最佳答案

Autotest对于 ruby 。它在您编辑文件时不断运行单元测试,使用一些简单的约定将源文件映射到测试文件。还有一个插件,我已经看到它在 emacs 中以交互方式将测试代码着色为红色或绿色。我认为这种在代码编辑器本身中通过/失败的即时视觉反馈的想法很棒。

关于unit-testing - 下一步是编辑触发测试吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1016841/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com