NUnit installation and NUnit Installation

Source: Internet
Author: User

NUnit installation and NUnit Installation

What is NUnit?

NUnit is a unit test framework specifically for. NET. NUnit is the 4th main product in the xUnit family. It is fully written in the C # language and fully utilizes many. NET features, such as reflection and customer attributes. The most important thing is that it is suitable for all. NET languages.

 

I. NUnit Installation

 

1. Download NUnit (NUnit-2.6.4.msi), double-click to install until complete.

It is worth noting that if we want to write the test class, we need to reference nunit. framework

 

2. view the test result (we recommend that you install the plug-in)

 

Generally, we want to see the results after running the test. There are three methods:

 

1. NUnit GUI

This is the client after NUnit is installed. The figure shows its interface. we load the dll or assembly of the program to run the test class and view the test results and results.

 

2. NUnit command line

It is related to the test using shell (graphical shell). Here we need to set the environment variable (add the NUnit installation Path C: \ ProgramFiles (x86) in the Path) \ NUnit 2.6.4 \ bin)

 

3. Nunit Test Adapter plug-in of Visual Studio (this is the integration of VS and NUnit)

In fact, I prefer this one. I don't need to open two windows every time like the first two. Instead, we only need to install a NUnit plug-in, you can directly execute the test in VS and see the test result ,.

Plug-in installation: In the VS toolbar → tools → extensions and updates (U) → In the pop-up box, select "online" on the left ", enter the keyword "nunit" in the search box, locate "Nunit Test Adapter", and click Install.


 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.