felix Antony
felix Antony

Reputation: 1460

What is the Connection between test case and unit test in TFS2012

Please help me to findout what is the relation between test cases and .net unit test? How we can uning the test cases to implement the unit testing in VS 2012? I am a new comer in .NET please help me.

Upvotes: 1

Views: 322

Answers (1)

DaveShaw
DaveShaw

Reputation: 52788

Test Case Work Items in TFS are a way of defining a "Test" that can be run to ensure your software behaves as expected. It will be made up of a number of "Test Steps" that describe the process.

For example a simple test case could contain the steps:

  1. Step: Run App - Expected Result: App Runs
  2. Step: Type Username, Click Login - Expected Result: Error, "Please enter password".

Unit Tests are part of your code base, and are not linked with TFS "test cases" in any way.

There are many articles on getting started in unit testing on the internet and in books. In short, create a "Unit Test Project", that will have one "Test Class" for each class in your code you wish to test. The Test Class will be made of many test methods which will provide assertions that your code is behaving as expected.

TLDR;

Unit Tests test "Units of Code". TFS Test Case Work Items, store the definition of test for the behavior of your application.

Upvotes: 1

Related Questions