Question

I have moved to a new project in my company where the team automates test cases using Visual Studio in C# and Selenium Web Driver.

They also use NUnit and TestDriven.Net. Why are these two needed for automation?

I find that the code has statements such as:

  • Assert
  • Test
  • TestSource
  • TestFixture

What do these statements do and are these statements part of TestDriven.Net or are these part of NUnit?

Can you please point to a good source to master these two.

No correct solution

OTHER TIPS

Google "nunit".

First result, the official site with A LOT of documentation: http://nunit.org/

Second one, Wikipedia: http://en.m.wikipedia.org/wiki/NUnit

Both are great answers to your questions.

NUnit is one of the main unit testing frameworks for .NET. The latest stable version is 2.6.3. All of the attributes you mention are part of it. You can find them described in the NUnit documentation:

To learn NUnit, the Getting Started page should get you a long way. If you need more in-depth knowledge, you should check out Roy Osherove's The Art of Unit Testing which aslo covers mocks, isolation and testing legacy code. He also runs online courses on unit testing.

TestDriven.NET is a Visual Studio extension to make it easier to run tests from many different frameworks (including NUnit) from within Visual Studio. You can right-click and select Run Tests (there should be a little rocket icon next to the menu option). Or alternatively, right-click and then Test With/Debugger.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top