Wednesday, August 12, 2009

Convert Visual studio Test to NUnit

As per my previous post You can create a unit test using Visual studio 2008 now you want this test solution to run in Nunit GUI.

  1. Uncomment using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. Add Reference nunit framework (install latest nunit ) dll will be here "C:\Program Files\NUnit 2.5.1\bin\net-2.0\nunit.framework.dll" framework to your test project
  3. Add nunit reference using NUnit.Framework;
  4. Change [TestMethod()] to [Test]
  5. Change [TestClass()] to [TestFixture]
  6. Comment function TestContext
  7. Comment //private TestContext testContextInstance;
  8. Build the solution open Nunit GUI ->Open the testing project dll which is created

Voila!! MS Test in Nunit

No comments:

Post a Comment