Legacy Documentation. View NUnit 3 Documentation

From NUnit 2.x

Beginning with version 2.2.1, old style test cases ("Test....") are no longer recognized by default. We recommend that you convert such test cases to use the TestAttribute. Alternatively, you may specify a setting in the test config file to allow use of old style test cases by default.

Beginning with NUnit 2.2.2, NUnit is able to run tests Built with older versions of NUnit 2.x without recompilation.

From NUnit 1.x

Upgrading requires a minimal amount of work. Since the framework still looks for test methods by name in addition to the attributes, no test method will need to be modified to upgrade to the new version. The only source code change required is to remove the constructor with the string parameter in the class that inherits from TestCase. The only new requirement is that you have a default constructor. If there was significant processing in the existing constructor then just move it to the default constructor. The only other change is to change the reference to nunit.framework.dll instead of the V1.x framework dll. Using the TestCase class has been marked obsolete so you will get warnings, but they can be ignored for now! 

Suite property

The existing Suite property will not be found by the new program. These must be changed to the "Suite" attribute for the test runners to find them. Another alternative is that these suites are no longer needed due to the automatic capability that is built in to the new version.


If you have written code expecting the exception AssertionFailedError, this must be changed to AssertionException.