Home > Microsoft .Net Development Tips > Application Testing and Security
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

APPLICATION TESTING AND SECURITY

Test-driven development in .NET yields complete unit test coverage


Ed Tittel, Contributor
02.16.2009
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Test-driven development stands normal development practice on its head by writing tests before you do any coding, then writing that code carefully, consciously and deliberately to pass those tests cleanly and completely. Writing tests in advance of coding lets you specify the behavior you want from your code before you write it; you then use those tests to ensure that the program works as specified. This approach to design, test and implementation also means you are much more likely to get complete test coverage (100%, in other words) out of your code, which makes it far more straightforward to apply standard code refactoring techniques.

TestDriven.NET is a third-party unit testing add-in for Visual Studio that helps developers turn this concept from breathless prose into hard-coded reality. It supports a variety of unit testing frameworks, including Visual Studio Team System (aka MSTest), MbUnit, xUnit, and NUnit. TestDriven.NET works with all .NET Framework versions. Earlier iterations of TestDriven.Net were developed specifically for NUnit and went by the NUnitAddIn product name.

TestDrive.NET supports the following kinds of functionality:

  • Single-click execution of unit tests within any method, class, namespace, project or solution right from inside Visual Studio.
  • Snap evaluations for methods or properties using simple ad-hoc tests (right-click and select Run test(s) or Test With > Debugger).
  • Ability to view any module or stack frame inside .NET Reflector while debugging inside Visual Studio.
  • Executes inside its own process context to permit testing sans side effects.
  • Support for debugging and code coverage analysis on any target tests.
  • Works with all major .NET languages, including C#, C++, F#, and Visual Basic.
  • Works with Visual Studio 2003, 2005, 2008 and 2010, running on 32- and 64-bit versions of Windows 2000, XP, Vista plus Windows Server 2003 and 2008.

Pricing for ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Application Testing and Security
How to write installers in Vista that work correctly under UAC
How to elevate programs' privileges correctly using Vista's UAC
Internet Explorer 8 beta's development tools add source visualizations
Microsoft previews new features in Visual Studio 2010
Advanced Windows Debugging Book Chapter and Podcast
Book excerpt: Advanced Windows Debugging
Book excerpt: Pragmatic unit testing in C# with NUnit
Security interoperability with .NET/WSE and WebLogic Workshop 8.1
How to avoid regression bugs while adding new features
NDepends: How you look at code

Team development with Visual Studio Team System
Microsoft cuts Visual Studio 2008 upgrade prices as VS 2010 looms
Microsoft offers startups free development tools, MSDN subscription
Outgoing Bill Gates says UML on tap in Oslo SOA modeler
A view on VS 2008: On-line agency sees reasons to upgrade
Microsoft unit testing effort grows, still faces NUnit challenge
SCM Visual Studio plug-in offers updated interface
Analysis: The state of Visual Studio Team System
Next Visual Studio Team System to target all SDLC roles
Sam Guckenheimer on software engineering and Visual Studio Team System
Scrum, Agile development methodologies mix with VSTS projects

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Visual Studio Team System  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


TestDriven.NET starts at $170 per seat for professional developers and $210 per seat for enterprise developers, but per-seat discounts are available; a free personal edition is available for trial, student or open source development use. See the TestDriven.NET download page for access, and the Quickstart page for a nice introductory tutorial.

Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. E-mail Ed at etittel@techtarget.com with comments, questions or suggested topics or tools to review.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts