InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

NUnit 2.5 Alpha released

Posted by Mark Levison on May 23, 2008

Sections
Process & Practices,
Development
Topics
.NET ,
Unit Testing ,
Agile
Tags
NUnit ,
TDD

NUnit is a Unit Test framework for the .NET languages. NUnit 1.x was straight port of the JUnit 3.8. With the 2.0 version NUnit was rewritten and redesigned as .NET application making use of Attributes instead of special methods and base classes.

Five versions and over five years later version 2.5 is in Alpha. This release includes support for:

  • Data Driven tests - using [TestCase] and [DataSource] allows data to passed into the test case via the Attributes.
  • Parallel and Distributed testing - a new test runner (PUnit) allows tests to run in parallel over several machines. This test runner was developed to help with the stress testing of a server.
  • Additionnal Asserts: Support for comparing file paths or directories without accessing the file system. More support for testing whether code does or doesn't throw an exception.
  • Run CSUnit tests: The CSUnitAddin supports running tests from another one of the major .NET test frameworks.
  • RowTestExtension: Allows developers to write RowTests for NUnit an alternative to NUnits [TestCase].
  • In addition the documentation has been updated.

 Other Major Features

  • Constraint based Assert model: In addition to the traditional assertions, NUnit allows you to say: Assert.That(myString, new EqualConstraint("Hello")); giving the user the flexibility to add their own constraints that are full participants in the NUnit eco-system.
  • Attributes that support declaring: Tests, Setup, Teardown, Fixture Setup/Teardown (per namespace setup/teardown), ...
  • Console and GUI test runners

Charlie Poole has also written to clear up confusion around the different versions of NUnit:

A few folks are confused by the various release numbers being announced or discussed all at one time, so I thought I’d clarify:

NUnit 2.4.7 is the latest production release of NUnit. It’s the one we recommend most people use for your tests. Some fairly critical performance bugs have been fixed in the last few releases, so you should update even if you’re only one or two digits back. See what you’re missing !

NUnit 3.0 is the planned - but not yet released - next generation NUnit. We call it the NUnit Extended Testing Platform, to distinguish it from the current NUnit Framework. It will provide a superset of the functionality of the current framework and is generally described here. I’ll be posting further info on NUnit 3.0 as it progresses.

NUnit 2.5 is release that wasn’t originally planned. The 2.4 series was supposed to be followed by 3.0. However, a number of people asked for a quicker release that included features provided by other test frameworks, which are currently missing from NUnit.

Other .NET Unit Test tools include: MBunit, CSUnit, xUnit.Net, NBehave and Gallio - an open, extensible, and neutral test runner designed to support all .NET test tools.

  • This article is part of a featured topic series on Agile

No comments

Watch Thread Reply

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.