• Embed Doc
  • Readcast
  • Collections
  • 1
    CommentGo Back
Download
 
What is VSTS?
Visual Studio 2005 Team System is a productive, integrated, and extensible suite of lifecycle tools that enable greater communication and collaboration among softwaredevelopment teams.One of the features of VSTS includes:• Setup Unit tests (replacing NUNit).• Create and run manual tests, Web tests, and load tests.The product is called
V
isual
S
tudio
T
eam
T
estA client tool for those devoted to testing that enables them to design, manage, andexecute manual, unit and load tests. It is designed to aid in the process of softwaredevelopment. VSTT enables
Code generation of test method stubs.
Running tests within the IDE.
Incorporation of test data loaded from a database.
Code coverage analysis once the tests have run.
Team Test
VSTS takes testing a step further than simple unit testing by making them availablein the Team Test product geared specifically for testers. This product enables testersto execute the unit tests developers create in a systematic fashion to ensure thatcode checked in by multiple developers’ passes previously constructed tests. This isan example of another testing best practice referred to as regression testing.Team Test goes even further by making testers first-class citizens of the project byhighlighting the importance of testing at the team level through a test authoring andexecution environment. That environment includes additional test types such as WebTests, Load Tests (similar to the tool Application Center Test tool that ships withVisual Studio .NET 2003), Manual Tests, and Ordered Tests and test casemanagement all integrated into Team Foundation.
 
Advantages/Benefit of Unit Tests
The unit tests serve as the first users of your system and will frequently identifydesign issues or functionality that is lacking.
A well-written test suite provides the original developer with the freedom to pass thesystem off to other developers for maintenance and further enhancement.
Cheaper cost - It is a component that comes along with the MS Visual StudioIDE.
Disciplined Development - Well defined deliverable for the developer and morequantifiable progress. Often, just considering a test case will identify issueswith an approach/design.
Facilitates change and Reduces code fragility Unit testing allows theprogrammer to refractor code at a later date, and make sure the module stillworks correctly (i.e. regression testing).
Simplifies integration - Unit testing helps eliminate uncertainty in the piecesthemselves and can be used in a bottom-up testing style approach. By testingthe parts of a program first and then testing the sum of its parts, integrationtesting becomes much easier.
Documentation
- 
Unit testing provides a sort of "living document". Clients andother developers looking to learn how to use the class can look at the unittests to determine how to use the class to fit their needs and gain a basicunderstanding of the API.
Relative cost to fix defects graph - The earlier an error is caught the cheaperit is to fix.It takes the typical developer time and practice to become comfortable with unittesting. Once a developer has been saved enough time by unit tests, he or she willlatch on to them as an indispensable part of the development process.Unit testing does require more explicit coding, but this cost will be recovered, andtypically exceeded, when you spend much less time debugging your application.
Writing effective unit tests
Always separate your unit test assemblies from the code you are testing.
Avoid altering the code you are testing solely to allow easier unit testing.
Each test should verify a small slice of functionality. Do not write longsequential unit tests that verify a large number of items.
All tests should be autonomous. Avoid creating tests that rely on other teststo be run beforehand.
 
Test both expected behavior (normal workflows) and error conditions(exceptions and invalid operations).
Test-driven development
Test-driven development (TDD) is the practice of writing unit tests before writing thecode that will be tested. TDD encourages following a continuous cycle of development involving small and manageable steps.The most common way to determine success in unit tests is to compare an expectedresult against an actual result. The Assert class features many methods that enableyou to make these comparisons quickly.
Team System Unit Test Assertions
Assert.AreEqual, Assert.AreNotEqualAssert.AreNotSame, Assert.AreSameAssert.EqualsAssert.FailAssert.InconclusiveAssert.IsFalseAssert.IsInstanceOfType
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...

awesome awesome stuff....detailed and easy to understand. Ashok.

You must be to leave a comment.
Submit
Characters: ...