QA Forums
Welcome on the QA Forums.

To take full advantage of everything offered by our software testing & Quality forums, please log in if you are already a member or join our community if you're not yet.... Smile
Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 35 on Tue Sep 23, 2014 10:22 pm
October 2017
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar


How to generate unit test cases in Visual Studio Team System

View previous topic View next topic Go down

How to generate unit test cases in Visual Studio Team System

Post  Ravi on Mon Sep 13, 2010 11:24 pm

1. In Solution Explorer, right-click a test project, point to Add, and then click Unit Test.

- or -

In Solution Explorer, right-click a test project, point to Add, and then click New Test. In the Add New Test dialog box, click Unit Test Wizard and then click OK.

- or -

In the Test Manager window or the Test View window, right-click the surface of the window and click New Test. In the Add New Test dialog box, click Unit Test Wizard and then click OK.

- or -

In the Visual Studio code editor, right-click a namespace, class, or method that you want to test, and select Create Unit Tests.

This displays the Create Unit Tests dialog box.

A tree structure displays the class and member hierarchy of the assembly that houses your code. You can use this page to generate unit tests for any selection of those members or classes, and to choose a project into which you want the generated unit tests to be placed. The code elements initially selected in the tree structure are the element that you right-clicked plus any child elements it contains. The selection is based on the current cursor position.

2. Click Filter to change the contents of the displayed class and member hierarchy

3. Select additional code elements by checking their boxes.

4. Click Settings to change configuration settings for this generation of tests. For example, you can change the default naming options for test files, classes, and methods to be generated. When finished, click OK.

5. Click OK.

If the test project for your solution does not already have a file that contains a test class, this action creates one and opens the file. The class is populated with an Initialize() method, a Cleanup() method, and methods to test the code elements you selected in steps 1 and 2. Solution Explorer displays the new test file in your test project.

Ravi

Posts : 11
Reward Points : 29
Join date : 2010-09-13

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum