How to: Configure Test Project Creation

A test project is a container for one or more tests. These tests may be all the same test type or of various types, including unit, Web, load, manual, ordered, generic, and third-party tests.

Each test project is associated with a language that determines the language of its contents. For example, when you add a unit test to a Visual Basic test project, the language of that unit test will be Visual Basic.

Note

Test projects are not available in all languages.

Note

Smart device test projects ignore these test project creation settings.

In this procedure, you set the programming language of new test projects, and whether one or more tests should be added to new test projects by default.

To configure test project creation

  1. On the Tools menu, click Options.

    The Options dialog box is displayed.

  2. Expand Test Tools in the left pane and then click Test Project.

  3. (Optional) Under Default test project type, choose a programming language for new test projects.

  4. (Optional) You might want to make sure that your test project and the project that contains your code under test use the same language. If so, select the check box When automatically creating a test project, ignore the default language setting and use the language of the production-code project instead.

  5. Under Select the files that will be added to each new test project, by default, choose, by language, the type of test project that you want to configure.

  6. Select the tests that you want added to test projects of the selected language as those projects are created.

    Note

    You can select zero tests. If you do, each new test project is empty, which means that it contains, for example, a property page and a reference to a namespace, but no tests or source-code files. You can add tests later through the Add New Test dialog box.

  7. (Optional) Repeat steps 4 and 5 for test projects in different languages.

  8. Click OK.

    The settings are stored for use the next time that you create a test project.

You can change these preferences at any time, before creating additional test projects.

See Also

Tasks

How to: Create a Test Project

Other Resources

About Unit Tests