Initial test of. Net program using nunit Software

Source: Internet
Author: User

In the. NET environment for unit testing, there are a lot of software to complete, nunit is one of them. This is a unit test software that is named in the same name as JUnit and belongs to the xunit family. This software is available for free in http://www.NUnit.org. Nunit ApplicationProgramProvides a framework for compiling unit tests and a graphical interface for running these tests and viewing results.

This is a problem that occurs when nunit is used for the first time.
After nunit is installed, its documents will be installed together with the local hard disk. Try to follow the instructions in this document.CodeAdd reference using nunit. framework; if you try to compile a program, a compilation error will occur. For example, E:/myproject/testnunit2/form1.cs (104 ): the type or namespace name "nunit" is not found (is the using instruction or assembly reference missing ?) The reason is that after nunit is installed, nunit-related references are not automatically added to the. NET environment and must be manually added. In Solution Explorer, right-click a reference and choose add reference from the shortcut menu. In the. NET Component, select nunit. Framework and click OK. Then re-compile the program to avoid errors.

The documentation and examples included in nunit are good. If you do not want to read English, someone on the Internet has translated it into Chinese and you can find it in the search engine "nunit Quick Start.

Related Article

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.