Creating unit tests in Visual Studio

Source: Internet
Author: User

1 Open tool -- Customize

2 Select context Menu -- Editor context menu | Code Window

3 Here we can see the "Create Unit Test" menu and move it below the Run Test menu

4 Close VS reboot

after restarting, right-clicking on the class name, the "Create Unit Test" button appears in the context menu, but it is grayed out and cannot be used. But we are not far from success.

Restarting is important, if not restarted, the menu does not come out.

5 Right-click in the solution, add - New project, add a unit test project.

6 Right-click Unit Test Project, add -- unit test

7. Haha, at this point, you return to the non-test project project, right-click on the class name, you can see the "Create Unit Test" can be used. such as

Creating unit tests in Visual Studio

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.