Professional.Open.Source.dot.NET.Development.Programming.with.NAnt.NUnit.NDoc [Electronic resources] نسخه متنی

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

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

Professional.Open.Source.dot.NET.Development.Programming.with.NAnt.NUnit.NDoc [Electronic resources] - نسخه متنی

John Wait

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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







Performance and Other Testing Tools


Windows Application Verifier


Windows Application Verifier (AppVerifier) is a great tool if you are targeting the Windows platform. AppVerifier comes with the freely available Application Compatibility Toolkit (http://www.microsoft.com/windows/appcompatibility/toolkit.mspx) from Microsoft. If you are creating shrink-wrapped applications and desire to have Windows Logo Certification, this tool will save you countless time and money. Even if you are just creating an application that is distributed in a highly controlled environment, AppVerifier can check your program for common coding mistakes including memory and security problems.

Table 6.5 shows the eleven AppVerifier tests that can be run on your application.

Table 6.5. Application Verifier Tests

Test Name

Test Description

PageHeap

This test inserts pages around all of the memory your application allocates on the heap. This allows the tool to catch buffer overruns and misuses of memory.

Locks

This tests for proper handling in the critical sections of your code.

Handles

If your application tries to access a null handle (one you have possibly already freed, for example), this test will catch your mistakes.

FilePaths

This test ensures that your program is obtaining path information by using the proper APIs and not hardcoding path strings.

HighVersionLie

This bizarrely named test shims itself between any calls to determine the version of Windows running and returns a very large version number.

RegistryChecks

Proper use of registry is tested by this test.

KernelModeDriverInstall

This tests the proper installation of drivers into Windows and that the driver is signed.

SecurityChecks

If your program does not have the permissions necessary to access resources or create process, this test will fail.

DFWChecksAll

This tests for Windows Logo Certification.

DFWChecksSetup

This tests for Windows Logo Certification of Setup programs.

DFWChecksNonSetup

This tests for Windows Logo Certification for non-Setup programs.

Figure 6-4 shows AppVerifier running on a simple picture resizing program I wrote.

Figure 6-4. Windows Application Verifier Verifying a Simple Program.

[View full size image]

Even this simple C# program has a number of issues to resolve, although it runs flawlessly on every machine on which it is installed. Imagine what a more complex large application would look like!

nProf and nProfiler


nProf (http://nprof.sf.net) is an Open Source .NET profiler that can be helpful in exposing the bottlenecks in your code. Figure 6-5 shows the tool's user interface.

Figure 6-5. nProf of a Simple Picture Resizing Program.

[View full size image]

nProfiler (http://nprofiler.sf.net) is another Open Source .NET profiler that, as you can see from Figure 6-6, is not as feature-rich as nProf but that is still very useful because it profiles slightly differently than nProf.

Figure 6-6. nProfiler User Interface.

[View full size image]

FxCop


Chapter 4 explored integrating FxCop with the build process using NAnt. FxCop checks the .NET assembly for correctness, CLS compliance, and a number of other common design mistakes.

HTML Tools


Chapter 4 suggested using with NAnt can also save a lot of time and money in Web development.


    / 275