我应该使用TDD? [英] Should I Use TDD?

查看:162
本文介绍了我应该使用TDD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的(很小)公司的唯一开发商和我即将开始一个中等大小的ASP.NET Web应用程序表示公司。

I'm the only developer in my (very small) company and I'm about to start on a medium sized ASP.NET web application for said company.

我想弄清楚,如果我要学习测试驱动开发(TDD),并在该应用程序中实现它。

I'm trying to figure out if I should learn Test Driven Development (TDD) and implement it in this application.

我要开始不久,我们开发新的应用程序,我担心测试。我编了很多年,但从来没有做过任何的单元测试。

I need to start developing our new application shortly and I'm worried about testing. I've programmed for many years but have never done any unit testing.

我读过关于TDD大量的在线资源,但我不确定我是否将有上有一个足够好的把握,使之有效地应用。

I've read numerous online resources regarding TDD but I'm unsure whether I'll have a 'good enough' grasp on it to make it effective in the application.

推荐答案

这取决于你在哪里躺下的优先级。如果你有兴趣在推进自己作为一个开发者,TDD是绝对值得寻找到如果只是为了体验。它会帮助你重新审视你code的方式,可能使因为你一个更好的开发者。

It depends on where your priorities lie. If you're interested in furthering yourself as a developer, TDD is definitely worth looking into if only for the experience. It'll help you rethink the way you code and probably make you a better developer because of it.

不过,可以很容易地通过TDD多少阻碍了你的能力,让你的产品在及时抵消。你提到,你是唯一的开发商在这家公司工作,这意味着,pressure是你得到你的项目做。 TDD无疑是一个伟大的实践,但有时现实生活中的约束性和实用性必须是第一位的。

But that could easily be outweighed by how much TDD hampers your ability to get your product out in a timely manner. You mentioned that you're the only developer working at this company and that means that the pressure is on you to get your project done. TDD is certainly a great practice, but sometimes real life constraints and practicality must come first.

因此​​,简而言之,如果你能抽出时间然后是,使用TDD。它实际上不是的的开销很大,你总是可以跳过在紧要关头的测试。但是,如果你真的绑的时间,不要以为你就可以将它没有把你的产品和面临失业的危险,没有人会指责你跳过它。在纯粹主义者会不同意,但它不是一个黑与白的世界,有时妥协必须作出把事情做好。

So in short, if you can spare the time then yes, use TDD. It's actually not that much overhead and you can always skip the testing in a pinch. But if you're really strapped for time and don't think you'll be able to incorporate it without putting your product and job at risk, nobody would fault you for skipping it. The purists will disagree, but it's not a black and white world and sometimes compromises must be made to get things done.

这篇关于我应该使用TDD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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