Visual Studio tests

How can I run a test case in VS2010?
Who is Participating?
You have to create a new test project (Please see attached pic)
After creating test project, add test case (similar to class file), see 2nd pic.

In test case file, create object of class you need to test and call methods. Some time you need to provide some test data.
Make sure your Test toolbar is enabled (Right click on your toolbar and select 'Test Tools') From this toolbar you can select different options to run your tests.

Or from the Test Menu Select Run->All Test in Solution
vivekj2004Author Commented:
Excellent solution. gdupadhyay even posted pictures to make sure that it's understandable. That's excellent. Thank you very much.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.