4

I have made a project in visual studio and also implemented unit testing. The code working fine with the unit testing.

Now I have a doubt that is it possible to implement unit testing outside the visual studio environment such that I only use the exe generated by my project and test it for multiple cases?

I am looking for an option which can utilise my current unit testing implementation

I am new to unit testing, so any help would be appreciated

thanks in advance

5 Answers5

1

You can use outside library like NUnit, there is manager to run your test

Jacek
  • 11,661
  • 23
  • 69
  • 123
  • Nunit is an option but I have already implemented unit testing provided by .net, So I was actually looking for an option in which i could use my current implementation. – Abhimanyu Srivastava Oct 19 '12 at 11:56
1

If from outside, you mean outside of Visual Studio IDE, then you can use mstest.exe which VS internally uses. This is stand alone in sense, that host doesn't need VS installed. Thus e.g. a build system can call this and do unit test towards the end of build.

Ankush
  • 2,454
  • 2
  • 21
  • 27
1

If you are using the Microsoft test framework, you can run MSTest.exe from the command line.

Trevor Pilley
  • 16,156
  • 5
  • 44
  • 60
1

Installing MSTest without Visual Studio is not quite trivial thing. This tool was very useful to me in this regard.
Originated from here

Community
  • 1
  • 1
Ivan Gerken
  • 914
  • 1
  • 9
  • 21
1

If you set up your test classes as per this SO answer then you can run them in either MSTest or NUnit, based on a compilation option. Hope this helps!

Using both MSTest and NUnit?

Community
  • 1
  • 1
DaveRead
  • 3,371
  • 1
  • 21
  • 24