In .NET we prefer to use VS .NET to do unit testing.Both VS 2005 and VS 2008 Team Editions support unit testing.
Way to do :
- Add a unit test project to your solution.
Navigate to the method that needs to be tested. Do a right click : Create Unit Test on the method.
To execute the test case, do a right click on the test case and select 'Run Tests':
The test will be executed and the run status displayer. We are re-run the test case or we can debug it with the appropriate buttons selected on the top:
To view the code coverage results, right click on the test case and select 'Code Coverage Results'.
The result will contain all the project which got invoked to make the test run:
Details of the method tested:
Similarly we can do a Code Analysis based on Coding Standards and generate Metrics
Coding Standards:
No comments:
Post a Comment