English 中文(简体)
关于TDD或ASP单位测试的问题。 NET MVC
原标题:Questions on about TDD or unit testing in ASP.NET MVC

I ve been searching on how to do Unit testing and find that it is quite easy, but, what I want to know is, In a asp.net mvc application, what should be REALLY important to test and which methods you guys use? I just can t find a clear answer on about WHAT TO REALLY TEST when programming unit tests. I just don t want to make unnecessary tests and lose development time doing overkill tests.

问题回答

您应尽量在<>上测试您的申请。

您撰写的每条法典,都需要核实。 如果你不试验,你需要以其他方式测试。 甚至开始现场和点击,也是一种测试。

如果你将单位测试与其他种类的测试(包括操作现场和人工使用)进行比较,单位测试往往使投资得到最佳回报,因为这些测试是相对而言的<>易于书写和维护的,并且可以就你是否刚刚引进回归的反馈。

我不想说,没有书面单位测试的间接费用——但是,在任何类型的测试中都存在间接费用,而且完全没有测试的间接费用(因为回归泡沫的脂重很轻)。

补充其他类型测试的单位测试仍是一种良好做法,但良好的单位测试套能提供极好的回归测试套。

rel=“nofollow noretinger”>Roneffries 说“《试验一切可能中断<>/strong>

还有一些人说,“

两者都是相当好的策略。

我实际上并不认为需要在多国师协会测试任何东西。 我认为,你们的所有业务逻辑、规则等都需要测试,但意见与主计长需要检验?

我能够测试主计长的唯一真正原因是进行一体化测试。 如果你的所有业务逻辑都正确,那就应当是一种简单检验,永远恢复。

主计长实际上只能从观点中获取数据,并将数据传递给它。

至于意见,除了开放观点和看看其做些什么之外,还可以做何种检验?

在我撰写项目时,控制人员没有密码,我把一切unt光放在我的商业引擎上,我对此进行了广泛的测试。

单位测试是测试服务/模型的良好条件。 但当你需要测试应用功能时,更好的选择是功能测试(即: Sel)。





相关问题
run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Unit testing. File structure

I have a C++ legacy codebase with 10-15 applications, all sharing several components. While setting up unittests for both shared components and for applications themselves, I was wondering if there ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签