In the first part of this two-part series, we looked at the Visual Studio 2008 family of four dedicated products, one each for Architecture, Database, Developer, and Test, as well as the all-in-one Team Edition. In the first article we looked at the Architecture and Database Editions in more detail. In this article, we'll look at the Development and Test Editions, and see how they are specialized in their roles.
With the primary focus of Visual Studio Team System being the development of applications for Windows Vista, there is a lot of effort to ensure that Vista's capabilities can be leveraged by VSTS. However, the ability to move back to previous .NET Frameworks allows VSTS to be used for any release of the Windows operating system. The main addition to VSTS to support Vista is the deployment of MFC 9.0, which provides the visual styles and new UI controls used by Vista.
The VSTS Development Edition adds a set of tools to the standard Visual Studio package for producing more robust code. There are a number of additions to the Development Edition that are not included in the other versions, all of which are designed to help a team development effort produce better code with less security issues, as well as allow a single developer to more efficiently develop, test and compile a final executable.
The tools in the Development Edition break down into a number of categories. One set of tools allows developers to analyze code for inefficient program coding, and for poor-quality code. As part of this code analysis toolset, developers can define best-practices to be applied to code, or accept the default set based on industry guidelines. By analyzing code for coding practices as well as the entire application for performance bottlenecks, the Development Edition tools should help developers write more stable and efficient applications. The Development Edition also allows rules to be put into place for source code check in, forcing a validation of the code before check in is allowed. This can help enforce coding policies, and avoid common mistakes. The code profiling tools are a useful set for developers, and not available in any of the other Editions (other than the all-inclusive Team Edition).
One aspect of the Development Edition that might surprise developers, especially those who struggled with the performance analyzer in Visual Studio 2005, is the ability to use the integrated profiling and code analysis tools to isolate and detect problem functions in an application. At the highest level, the analyzer shows which functions were invoked and used the most processor time, but the ability to trace those functions to their root method means you can deselect system calls that should not factor into code analysis. Also, a feature called Hot Path marking lets you mark the critical path in the calling tree, at least from your performance-oriented point of view. A report shows all the modules and functions in an application that call the performance-intensive methods. After that, a study of the test run information filtered by the new Noise Reduction filters (to remove unwanted information) and in just a few keystrokes you can isolate code problems and actively correct them in only a few minutes.
There is also a set of tools for creating and managing unit test cases, which allow developers to automate the unit test cycle quickly. Earlier versions of Visual Studio only included unit test development as part of the Team Editions, so the move to the Development Edition is a welcome one. Providing the creation of unit tests to developers frees up testing personnel to focus on larger test issues such as integration tests. Since the coder is probably in the best position to write unit test cases, the ability to do this quickly is a benefit of the Development Edition. The creation of test cases with the Development Edition is quite easy, although knowledge of what makes a good test case (and also a bad one) is useful. A Test Project wizard helps set up the basic framework for a test case project, and new unit tests can be created on top of the project. Of course, some knowledge of the application and what to test specifically as part of the unit test is required.
Once tests are defined, entire test suites can be triggered and the results analyzed. There are three windows involved in test cases with the Development Edition. The Test Results window is displayed after the tests are run, and shows a quick summary of the tests (passed or failed icons make this simple) as well as any generated error messages if a test failed. More information about any test is available from the Test View window, which shows the test name and specifics of the test. Finally, the Test List Editor lets you organize individual test cases into lists, with the ability to add individual tests to more than one list, each list used for different test runs.
Visual Studio Team System 2008 Development Edition allows you to launch unit tests from within the code editor, which saves time and allows in-line debugging as the code is being written. A right-click in a test method or test class pops up a menu, which lets you launch tests at that point. You can launch either single unit tests, or run all applicable unit tests at that point.
Code analysis is a focus of Visual Studio Team System 2008 Development Edition. Code analysis allows a developer to scan source code and perform a number of different checks for a wide variety of code issues. Code analysis rules are used to define how code analysis takes place. Code analysis rules can be combined into rule sets, which can be executed individually either manually or automatically. Rules sets can also be customized for individual projects. The default rule sets can be triggered as needed, and include rule sets for specific purposes. The code analysis rules included with Visual Studio Team System 2008 Development Edition are not the same as those in the Visual Studio 2005 Edition. While many rules are the same, several were removed for a number of reasons (including the dropping of one analysis engine completely), others were merged together to ensure no overlap of rule purposes, and some were added or modified to make them more useful.
An add-on to Visual Studio Team System 2008 Development Edition is Microsoft's FxCop, a code analysis tool designed for checking .NET managed code to ensure it conforms with the .NET Framework Design Guidelines. FxCop is available for free download and works with Visual Studio Team System 2008 Developer's Edition. FxCop uses MSIL parsing, callgraph analysis, and other techniques to isolate and identify over 200 defects. Combining FxCop and the code analysis tools included with Visual Studio Team System 2008 Development Edition allows developers to perform a remarkably complete set of analysis routines on source code.
Designed for use by developers and dedicated testing teams, the VSTS Test Edition includes a set of tools that are tightly tied to the Visual Studio environment. The Test Edition toolset can be used as a self-contained testing environment, or included as part of a larger suite of testing tools from other vendors. The focus of the Test Edition is the creation, management, and execution of test cases and larger test plans, with a recoding mechanism for test results. Unit testing, load testing, and Web testing tools are all available, and there is always the option for manual testing outside the test cases developed within VSTS. While each of the other Editions of Visual Studio has some test capabilities included, especially in the area of unit tests, the Test Edition provides a more robust and complete set of tools for creating test suites that cover all aspects of the software development process.
The testing tools of VSTS are accessible through the Test menu item, which allows you to create, modify, trigger, review and manage tests, test lists, and test results. Tests are built into a solution just like a code component, and executables can be built with test components which allows test cases to be executed on the target platform, providing unit test capabilities. Also, host adapters can be created to allows testing in non-default test environments, potentially leading to porting of applications to new platforms. While some of the test creation tools are not available to other versions of Visual Studio (such as Visual Studio Professional), a built assembly from a Test Edition can be opened with Visual Studio Professional and all defined tests run under that environment. Since the tests are now built into the Visual Studio tool itself, tests can be triggered from inside code, instead of outside (as used to be the case).
One nice feature of the test structure in Test Edition is the ability to apply inheritance to test classes. This allows you to build reusable and base tests, which can then be inherited and expanded upon in other test cases (including overriding specific test cases). Even better, one test case can call another test case directly. Another feature testers will like is the ability to auto-delete old test runs, which tended to add up into enormous directories with previous editions of Visual Studio. A handy aspect of the VSTS Test Edition focus on testing is the ease with which the built-in test types can be extended. This allows non-Visual Studio test tools to become part of a larger test suite executed by VSTS Test Edition. It also allows completely new test types to be created within the VSTS environment.
Load testing abilities have been improved with the VSTS Test Edition. With the new load testing cases, you can create various simulated loads for load tests, and then examine the results with a new set of graphical load test analyzer views. These graphical views of load tests provide direct visual feedback on results instead of working with tables, and can be exported for use in summaries and presentations. Web testing has had similar improvements, with the ability to create test-level validation rules as well as halt actions. The Web test routines now include support for XML and CSV files, and there's a new data binding process to make testing easier.
There are code analysis rules built in to the Visual Studio Team System 2008 Test Edition that perform many different types of analysis, but you are always free to write your own set of rules. As part of the latest updates to Visual Studio Team System 2008 Development Edition, some new features have been added that greatly help code analysis. The Historical Debugger allows developers to record data as the application is executing. An error in the application is captured by the Historical Debugger, quickly allowing root cause to be determined. Stepping forward and backward from the error location helps isolate the error location more precisely, as well as the triggering conditions. The major advantage of the Historical Debugger is that the time required for isolating the causes of an error is reduced.
A Standalone Debugger is also available for Visual Studio Team System 2008 Test Edition. Intended to be run as a lightweight application, the standalone debugger is run without Visual Studio, and can be run on any machine executing an application. The Standalone Debugger allows developers to test and diagnose problems in a production deployment environment, instead of on a development machine. With no setup required, the Standalone Debugger is designed for minimal impact on the environment, and can be run on a USB device if needed.
The Visual Studio Team System Team Suite is composed of all four separate editions (Architecture, Development, Database and Test) and provides all the features and tools of each of those four editions in one wrapper. This provides an all-in-one development environment. As part of a larger team development environment, VSTS Team Suite is usually coupled with Team Foundation Server (TFS), which provides wider project management, version control, team building, reporting, and work item tracking capabilities for a number of developers using the system. TFS integrates with Office, allowing export and import of information with Excel and Microsoft Project for more efficient project management tasks. TFS also provides a Web portal for access to project resources and functionality. TFS is not a requirement for team development with Visual Studio Team System Team Suite, although some source code management system should be used for applications.
Sitting on top of TFS, the Visual Studio Team System Team Suite is used for the coding, testing, and building of applications, and can use the source code control capabilities of TFS as part of the integrated development environment. In addition, VSTS Team Suite can be coupled with additional components such as an Office development platform to provide more functionality. Using Visual Studio Team System Team Suite with TFS, a team of developers and testers can work with one environment and one code management structure, with seamless collaboration between team members, to create distributed applications more easily than possible before.
The Visual Studio Team System 2008 Development Edition offers a number of features over and above those available in the more generic Visual Studio 2008 product, and while application developers may find a lot of these additions are not required for smaller applications, as development moves to larger applications, especially distributed applications in a team environment, Visual Studio Team System 2008 Development Edition really starts to stand out. For developers, the toolset included in the Development Edition begins to become an integral part of the development process, with new ways to use the existing tools discovered at intervals, sometimes by accident, all of which leads to a friendlier and all-inclusive development environment. Unit testing, embedded in the development tool itself, allows developers to take on more of a role in the simpler testing phases, offloading dedicated testers and cutting the code-edit-debug cycle times dramatically.
The Visual Studio Team System 2008 Test Edition provides tools specific to testing environments, including the ability to easily define entire test suites, broken down by detail for testers to follow and annotate, as well as for developers to examine during debug processes. The inclusion of automated details, as well as screen shots of bug instances, makes the debug process easier to conduct. With the standalone debugger and historical debugger features included with Visual Studio Team System 2008 Test Edition, the debug process can be taken to deployment environments for in-situ testing that would not be possible usually. For test groups, and testers individually, the toolset provided with Visual Studio Team System 2008 Test Edition is well worth the investment.
All in all, the features provided by the Visual Studio Team System 2008 special editions, or those wrapped together into the Visual Studio Team System Team Suite, make the 2008 iteration of Visual Studio a significant advance on the earlier platform, and, except in special cases, should allow all development group members including architects and testers, to work with a single, unified tool. When Visual Studio Team System Team Suite is combined with Team Foundation Server, the platform for large-scale distributed application development is simple, as there is no competing tool on the market that can do all that Visual Studio Team System Team Suite and TFS manages.