AutomatedQA: Award-winning tools for software testing and quality assurance

Home » Products » Microsoft Visual Studio 2005 Team System Support

Microsoft Visual Studio 2005 Team System Support

Microsoft Visual Studio 2005 Team System, part of the Microsoft Visual Studio 2005 release, includes tools and technologies for all members of software development teams: project architects, developers, testers, managers, etc. For instance, Team System includes special utilities for code analysis and special types of Visual Studio projects (test projects) that can be used for testing purposes.

AutomatedQA is committed to offering a tight integration with Microsoft Visual Studio 2005 Team System services and subsystems. The integration of AutomatedQA tools allows you to --

Extend Visual Studio test projects with new test types: TestComplete test (TestComplete 3) and TestComplete4 test (TestComplete 4) for TestComplete and AQtime test.
With TestComplete tests you can execute TestComplete scripts and tests as part of your Visual Studio test project. More...
With AQtime test you can easily integrate tests for memory leaks and for platform compliance into your test process. More...
 
Extend your tests via unit tests created with Visual Studio 2005. This means that you can run unit tests that were created with Visual Studio 2005 as part of your test batteries that are run from Automated Build Studio macros or easily integrate Visual Studio unit tests into the collection of tests in TestComplete. More...
 
Post issue reports to Team System directly from TestComplete test projects. TestComplete 4 provides an easy creation of work items in the Team System database. These items may be bug reports or include test results. More...
 
Edit and add new work items to Team System from your Automated Build Studio visual macros. More...
 
Work with files stored in Team Foundation version control directly from your Automated Build Studio macros. Build Studio is the first build & release management product on the market that provides support for Team Foundation version control. You can put files to, get them from the version control, set and delete labels, etc. using special Build Studio operations. More...
 
Call Automated Build Studio Macros From...

    MSBuild Projects. This lets you perform those actions that cannot be done otherwise in your MSBuild project (for example, you can get files from a source control system, send e-mail notifications, run testing tools, etc.). MSBuild projects can also be called from Automated Build Studio macros. More...

    Visual Studio 2005 Team Explorer. Using Build Studio macros you can build projects and solutions that make up your team project, or perform any other actions you like. More...

 
Run TestComplete Tests directly from your MSBuild projects. More...
 

Extending Visual Studio's Test Items with TestComplete Tests

AutomatedQA offers a Team System plug-in that lets you use TestComplete scripts as part of your test project(s) created in Visual Studio 2005. After the plug-in is installed, it adds a special test item to the list of test project items available in Visual Studio. The item name is TestComplete test if you use TestComplete 3, or TestComplete4 test if you use TestComplete 4.

The integration with Visual Studio is seamless and natural, and the use of TestComplete Test items is similar to the use of any other test item available in Visual Studio.

After you add a TestComplete Test item to your test project, it will appear as a child node of the project's node in the Solution Explorer. In the test item properties you can --

Select the TestComplete project or project suite to be used.
Specify the tool - TestComplete or TestExecute - that will run the tests (TestExecute is a lightweight resource-friendly utility for running test projects created with TestComplete).
Define the routines or test suites to be run by the test.

Once you set the properties of the TestComplete Test item, you will be able to add this item to the list of tests to be run:

Open the Test Explorer panel (View | Quality Tools | Test Explorer).

Place the TestComplete Test (or TestComplete4 Test) item in the desired category and enable it for execution.

To run the test project, click the Run button on the Visual Studio toolbar. When the TestComplete Test item is being executed, it launches TestComplete (or TestExecute), loads the specified TestComplete project and runs a script routine or test suites.

After the test project run is completed, the results of the TestComplete Test items are shown in the Test Results panel along with other testing results:

Here you can quickly see whether TestComplete tests passed successfully or failed. To view a detailed output of a TestComplete test, simply double-click it in the panel:

Integrating Tests for Memory Leaks and Platform Compliance into Visual Studio Test Projects

The search for memory leaks and check for platform compliance is performed by AQtime, which is AutomatedQA's performance profiler and memory and resource debugger for both Win32 and .NET applications.

Once AQtime is integrated into Visual Studio 2005 Team System, a new AQtime test is added to the list of available test items:

To integrate a test for memory leaks (or platform compliance) into your Visual Studio tests, simply add the AQtime test item to your test project. The item will appear in the Solution Explorer as a child node of your test project.

Double-click the AQtime test item to modify its properties:

The Select Profiler property specifies the profiler that will be used for your tests. You can select one of the following profilers:

Allocation Profiler - Use this profiler to detect memory leaks that may exist in your application.
Resource Profiler - Use this profiler to detect any unreleased Windows resources (brushes, icons, bitmaps, etc.)
Platform Compliance - Use this profiler to check what Windows versions support the API calls in the source code of your application.

The AQtime Project property specifies which AQtime project will be run.

The TestComplete Project property specifies the TestComplete project that can be run to simulate user actions (mouse clicks, keystrokes, etc.) over the application under test. When TestComplete is used together with AQtime, no user action is required to perform the tests.

The results of AQtime test are shown in the Test Results panel along with other test results:

To view a more detailed test output, simply double-click the desired AQtime test item in the Test Results panel. Below are sample outputs of AQtime test items:

Allocation Profiler Results

Resource Profiler Results

Platform Compliance Results

Extending Your Test Batteries with Visual Studio Unit Tests

You can use unit tests created with Visual Studio in Automated Build Studio projects and TestComplete projects.

Automated Build Studio includes the Run MSTest operation that lets you call tests created with MSTest directly from your Build Studio macro. By using this operation you can easily integrate Visual Studio unit tests into the collection of tests that you use to test your application(s). All you have to do to call unit tests is to --

Add the Run MSTest operation to your Build Studio macro
and
Modify operation parameters to specify the file name of the assembly holding the tests, specify the configuration file name and specify the file or variable for the output.

That's all. After adding the operation and specifying its parameters, you will be able to run your macro and then analyze the results of your unit tests.

In Build Studio, by using the built-in configurations support or the If... Then operation, you can enable or disable the execution of your unit tests according to specific conditions (for example, running your unit tests only as part of the “test”/“debug” builds). That is, by running MSTest tests from Build Studio, you can not only extend your existing test collection, but also make the testing process more flexible.

TestComplete includes the Unit Testing project item that lets you call unit tests created with MSTest directly from your TestComplete project. By using this functionality you can easily add Visual Studio unit tests into the collection of unit tests. To call Visual Studio unit tests --

Add the UnitTesting project item and select MSTest in the list of available test types.
Specify the test name and location of the file that will hold the test settings and the assembly holding the desired MSTest tests.
Define the path to MSTest.exe in the Path to MSTest option of the Unit Testing Options dialog.

Adding MSTest unit test

After adding the MSTest you will be able to run the unit test in TestComplete and then post and analyze the results in the Test Log.

Post Issue Reports to Team System Directly From TestComplete Test Projects

TestComplete 4 supports the creation of or change to Team System's work items directly through TestComplete test projects or IDE. Using TestComplete dialogs you specify the login, password, computer name and other parameters needed to connect to the Team System database. TestComplete will then store these settings into an issue-tracking template, which can be used to create (or to edit) an item in the Team System Database.

The template parameters let you map template fields to the fields of the Team System database. You can also specify the action (creation or modification of an item) that will be performed by a template.

Using the templates you can create work items holding test results directly from TestComplete's test log:

You can also write script code that will create (or modify) work items. To pass data to be stored in item fields use parameters of the method, whose name coincides with the name of your template.

Editing and Creating Work Items in Team System

Creation and editing of work items stored in Team System can be done with two special Automated Build Studio operations: Create New Item in Team System and Edit Item in Team System.

For example, using these operations you can easily create or edit work items if your tests failed. This ensures that the results of test runs are not lost and that the person responsible for this (a developer or a tester) is notified about the problem as soon as it occurs.

Team Foundation Version Control Support

Support for Team Foundation version control (TFVC) is implemented as a special set of operations in Automated Build Studio. These operations allow you to work with TFVC directly from your Automated Build Studio visual macros:

Using these operations you can check files in and check them out from TFVC in the same way as you do this with Microsoft Visual SourceSafe operations in Automated Build Studio.

Besides checking files in and checking them out, you can also --

Set and remove labels to/from files stored in TFVC
Move and rename files
Merge files
Lock files
Branch files
Etc.

As you can see, using Automated Build Studio you can perform any source control operation that can be done in TFVC.

Calling Automated Build Studio Macros From MSBuild Projects and Vice Versa

You can call Automated Build Studio macros directly from your MSBuild projects. For this purpose, you need to install a special assembly, MSBuildABSTask, on your computer. Below is an example of an MSBUild project file that runs a Build Studio macro:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="ABS.ExecuteMacro" 
             AssemblyName="msbuildabstask, Version=1.1.0.0, Culture=neutral, PublicKeyToken=550bc1d712c881df"/>

  <Target Name="Build">
    <ExecuteMacro
       MacroFile="C:\MyFolder\MyProject.bxp"
       Configuration="Release; Debug"
       StopIfFail="true"
       AdditionalOptions=""
     />
   </Target>

</Project>

By calling a Build Studio macro from your MSBuild projects, you can perform almost any actions during the build process initiated by MSBuild. For instance, using macros you can get files from a source control system, send notifications, etc. MSBuild cannot perform these actions itself, without the help of Build Studio.

You can also build your applications with MSBuild directly from your macros. The support for MSBuild is implemented as a special operation of Automated Build Studio. This operation lets you run MSBuild projects directly from your macros. Operation properties let you specify the MSBuild project name and project options (configurations, etc.):

Automated Build Studio Integration into Team Explorer

Automated Build Studio is tightly integrated with Microsoft's Visual Studio 2005 Team Explorer panel and allows you to run macros directly from Team Explorer. You can use macros to build projects and solutions that make up your team project, or to perform any other actions. Since the Team Explorer integration package is installed each team project will have the AutomatedBuildStudio node.

The AutomatedBuildStudio node holds two sub-nodes: Macro File and Macro Runs. The Macro File node provides access to the Build Studio macro associated with the project. The Macro Runs node is used to initiate and monitor macro runs and to view the macro run results and history.

Running TestComplete Tests From MSBuild Projects

TestComplete Enterprise edition includes the MSBuildTC4Task assembly that lets you execute TestComplete tests as part of your MSBuild projects. Below is a typical example of executing a TestComplete project suite from an MSBuild project:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="TC4.ExecuteSolution" 
             AssemblyName="msbuildtc4task, Version=1.1.0.0, Culture=neutral, PublicKeyToken=948a15855538eecd"/>

  <Target Name="Build">
    <ExecuteSolution
       SolutionFile="C:\MyProjects\MyProjectSuite.pjs"
       StopIfFail="true"
       AdditionalOptions="/project:MyProject"
       GUIInteractive="true"
       LogFile="c:\MyProjects\MyResults.mht"
     />
   </Target>

</Project>

The results are posted in the log file, specified by the LogFile attribute. You can view the log file in Internet Explorer, since it is stored in the Multipart HyperText format. By using this method you can achieve all the benefits of TestComplete scripts in your MSBuild projects: work with applications via the user interface, access internal structure of "open" applications, perform unit testing and so on.

Copyright © 1999-2008, AutomatedQA, Corp. All Rights Reserved.
Home | Legal | About | Contact | Site Map | Print