Open Source .NET Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Open Source .NET Development [Electronic resources] - نسخه متنی

Brian Nantz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Other Tools Useful with NUnit


One paragraph on each of these tools is barely adequate to describe their functionality, but the chapter would not be complete without mentioning these tools that can help with the testing of your code.

NCover


The one useful outcome of testing by stepping through a debugger is that you can ensure that every line of code is tested, including the most obscure and remote error handling that may never see the light of day in normal operating conditions. Unfortunately, stepping through a debugger is very time-consuming and not very repeatable because of human error. NCover is a coverage tool (available from http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=3122EE1A-46E7-48A5-857E-AAD6739EF6B9) to keep track of what code was executed. Combined with NUnit, NCover can tell you exactly what lines of code were executed and can provide full statistics on how often lines were executed. There is also an NCover project (completely unrelated) on Sourceforge that is meant to be a NAnt task. Take a look at it on http://www.sourceforge.net/projects/ncover.

Object Mocking


Mock Objects can be very useful in conjunction with unit testing. A Mock class can replace a real class that your code depends on. This allows quick identification of where the bug resides. Is the bug in your code? In dependent code? Or is the bug in the framework? The real power of Mocking comes in real-world simulation like network and database transient connectivity. POCMock (http://www.prettyobjects.com/) and nMock (http://nmock.truemesh.com/) are Mock Object Platforms for .NET development.

HttpUnit


NUnitASP mostly focuses on unit testing the server-side portion of your code. As a complement, HttpUnit (httpunit.sourceforge.net) is available and can provide the missing functionality. HttpUnit can test client-side JavaScript, authentication, and cookies. HttpUnit heavily relies on Java and easily integrates with Ant.

DbUnit


NAntContrib does include a handy SQL task, but if your application needs more functionality than this, there is DbUnit (dbunit.sourceforge.net). DbUnit is an extension of jUnit and does require knowledge of Java. Teamed with Ant, DbUnit allows unit testing of stored procedures and other very useful database functionality.


    / 275