Chapter 13. Testing Internationalization Using FxCop


ONE OF MY GOLDEN RULES of development is:

Anything a developer has to remember to do, they will eventually forget to do.

Rather than any criticism of developers I have worked with, this is instead a simple acknowledgment of the fact that there is simply too much to remember in development and that we are all human and we will all eventually forget something important. Most development departments have a coding standard. We all know that we are supposed to adhere to this coding standard, but sometimes we forget some of the details. Sure, these get picked up in a coding review, but even the coding review is a human process and subject to error. That's where FxCop comes in and takes the hard work out of checking the tiny (and not so tiny) details.

FxCop is a static analysis tool from Microsoft. It is included with Visual Studio 2005 Team Edition for Software Developers and Visual Studio 2005 Team Edition for Software Testers, and is available for download for all versions of both Visual Studio 2003 and Visual Studio 2005 from http://www.gotdotnet.com/team/fxcop. Put simply, FxCop reads one or more assemblies and applies coding rules to them. FxCop includes a library of existing rules and enables you to write your own. Throughout this book, I have discussed many internationalization practices that will make your project viable. You may have chosen to adopt some of these ideas in your development process. Certainly, it would be a good idea to formalize these in some internationalization standards document, but documents are simply a repository of information. They are passive, not active, and developers are human and will forget the standards that they are supposed to remember. FxCop gives us the capability to ensure and enforce these standards. In this chapter, I give a brief introduction to FxCop, show how FxCop can be enabled in Visual Studio 2005 Team Edition for Software Testers, discuss the globalization and spelling rules that are included in FxCop, introduce many new globalization rules that are included with this book, and explain how these rules were written.

For the purpose of this chapter, you need either FxCop 1.35 or FxCop 1.32. The former requires the .NET Framework 2.0 and analyzes assemblies for both the .NET Framework 2.0 and 1.1; the latter requires the .NET Framework 1.1 and analyzes assemblies for only the .NET Framework 1.1. If you have Visual Studio 2005 Team System, you already have version 1.35.




.NET Internationalization(c) The Developer's Guide to Building Global Windows and Web Applications
.NET Internationalization: The Developers Guide to Building Global Windows and Web Applications
ISBN: 0321341384
EAN: 2147483647
Year: 2006
Pages: 213

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net