如何开始单元测试? [英] How do I start unit testing?

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

问题描述

我知道单元测试是可取的,并且我对进行单元测试感兴趣.唯一的问题是我不知道该怎么做,甚至不知道该从哪里开始.所以我的问题是:如何学习并开始单元测试?特别是,我经常在NetBeans中编写Java代码,在Visual Studio中频繁编写C#代码,并且对使用哪种工具以及如何弄湿自己感兴趣.有人可以提供有关绝对单元测试n00b的任何建议吗?

I know that unit testing is desirable, and I am interested in doing unit testing. The only problem is I have no idea how, or even where to start really. So my question is: How do I learn about and start unit testing? Specifically I frequently write Java code in NetBeans and C# code in Visual Studio and am interested in what tools to use and how to get my feet wet. Can anyone offer any advice for an absolute unit testing n00b?

我知道这里有很多类似的问题,但是我对原因不感兴趣,而对方法更感兴趣.

I know that there are a lot of somewhat similar questions out there but I am less interested in why and more interested in how.

推荐答案

This Tutorial for writing JUnit tests in NetBeans should give you an idea how unit testing is done technically. NUnit for C# works pretty much the same.

有关如何将单元测试集成到您的日常开发中的高级视图,标准参考文献是Kent Beck的示例驱动的测试开发". 此处是广泛的概述.

For an advanced view of how to integrate unit testing into you daily development, the standard reference is Kent Beck's "Test Driven Development By Example". Here's a broad overview.

这篇关于如何开始单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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