单元测试反模式目录 [英] Unit testing Anti-patterns catalogue

查看:37
本文介绍了单元测试反模式目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

反模式 :必须至少有有两个关键要素可以正式区分实际的反模式与简单的坏习惯、坏习惯或坏主意:

anti-pattern : there must be at least two key elements present to formally distinguish an actual anti-pattern from a simple bad habit, bad practice, or bad idea:

  • 一些最初看似有益的重复行为、过程或结构模式,但最终会产生比有益结果更多的不良后果,以及
  • 经过重构的解决方案,具有清晰的文档记录、在实际实践中得到验证且可重复.

为您已经在野外"见过太多次的 TDD 反模式投票.
James Carr 的博文测试驱动开发yahoogroup相关讨论

Vote for the TDD anti-pattern that you have seen "in the wild" one time too many.
The blog post by James Carr and Related discussion on testdrivendevelopment yahoogroup

如果您发现了一个未命名"的..也将它们发布出来.请为每个反模式发一篇帖子以使投票对某事有意义.

If you've found an 'unnamed' one.. post 'em too. One post per anti-pattern please to make the votes count for something.

我的既得利益是找到前 n 个子集,以便我可以在不久的将来在午餐会上讨论它们.

推荐答案

二等公民 - 测试代码不像生产代码那样重构,包含大量重复代码,很难维护测试.

Second Class Citizens - test code isn't as well refactored as production code, containing a lot of duplicated code, making it hard to maintain tests.

这篇关于单元测试反模式目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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