18.12. Microsoft® Visual Studio® Integration

18.12.1. Microsoft® Visual Studio® 2010 Integration
18.12.2. Microsoft® Visual Studio® 2012 Integration

This add-on package tightly integrates Squish with the Microsoft® Visual Studio® product family. This allows Squish test cases and test suites to be imported into and executed from within Visual Studio®, Microsoft® Test Manager and Team Foundation Server. All that's necessary to make this work is an extra software package provided by froglogic which introduces a new Visual Studio® Squish test type.

18.12.1. Microsoft® Visual Studio® 2010 Integration

This add-on package tightly integrates Squish with the Microsoft® Visual Studio® 2010 product family. For Visual Studio 2012, please refer to Microsoft® Visual Studio® 2012 Integration (Section 18.12.2).

The integration allows Squish test cases and test suites to be imported into and executed from within Visual Studio®, Microsoft® Test Manager and Team Foundation Server. All that's necessary to make this work is an extra software package provided by froglogic which introduces a new Visual Studio® Squish test type.

18.12.1.1. Obtaining the Visual Studio® Integration

The Visual Studio® Integration is supplied as an executable installer file.
[Note]Separate Purchase

This add-on must be bought separately. Contact for details.

18.12.1.2. Requirements

18.12.1.2.1. Requirements for Test Execution through Visual Studio®

For local execution of Squish tests through Visual Studio® one of the following Visual Studio® editions is required:

  • Professional
  • Premium
  • Ultimate

For distributed execution the Visual Studio® Test Agents are required in addition to one of the Visual Studio® editions mentioned above.

18.12.1.2.2. Requirements for Test Execution through Microsoft® Test Manager

For the execution of Squish tests via Microsoft® Test Manager, the Microsoft® Team Foundation Server is required. Squish tests that should be executed via Microsoft® Test Manager have to be added to Team Foundation Server using one of the following Visual Studio® editions:

  • Professional
  • Premium
  • Ultimate

In addition, the Visual Studio® Test Agents are required.

18.12.1.3. Installing the Visual Studio® Integration

To install the Visual Studio® Integration simply run the installer executable. The integration has to be installed on the machine where Visual Studio® runs on. For distributed test execution through a Visual Studio® Test Agent instance used by Visual Studio® or Microsoft® Test Manager the integration has to be installed on the agent's machine, too. A wizard will guide you through the necessary installation steps.

[Note]Updating from the Visual Studio® Integration 1.0.7 and before

From version 1.1 on, the way to specify the Section 18.12.1.4.4.1, “Default Squish Installation” changed. When updating from an earlier version, the setup procedure will automatically detect the default Squish package that has been set for the previous version of the integration.

18.12.1.4. Creating a Visual Studio® Squish Test Project

18.12.1.4.1. Creating the Visual Studio® Test Project

To open and execute a Squish test from Visual Studio®, a Visual Studio® test project has to be created. To do this select File|New|Project... which will open the dialog shown below. Select Installed Templates|Test Projects|Test Documents|Test Project and enter a name for the project. Finally, create the project by clicking OK.

This creates a Visual Studio® solution containing the test project. The solution and project structure will be shown in Solution Explorer:

Depending on the settings and the default programming language of your Visual Studio® installation, a unit test source file might be created. For example, if the default programming language is set to C#, Visual Studio® will add a file called UnitTest1.cs to the project and automatically open that file for editing. This file is not needed for Squish tests and can be deleted. To do this, right-click the file in Solution Explorer and click Delete. You will be asked to confirm this operation.

18.12.1.4.2. Adding the Visual Studio® Squish Test to the Test Project

Before a Squish test suite can be added a Visual Studio® Squish test has to be created. This is a specialized Visual Studio® test type that is used as a container for Squish test suites, their test cases, shared data and settings.

To create a new test of this type in the test project, right-click the test project in Solution Explorer. Select Add|New Test from the context-menu. The dialog shown in the screenshot below will show up. Select Squish Test from the listed Templates, enter a name into the field Test Name and click OK.

This creates a blank Squish test in the test project. The test will be listed as a child element of the project in Solution Explorer and has the file extension .st. Visual Studio® will automatically open the file in an editor like it is shown in the screenshot below. This editor allows to import the test suite and test cases and to edit further configurations.

18.12.1.4.3. Importing the Squish Test Suite

To select a test suite, click the browse button right beside the field Test Suite. A file dialog will be opened. Browser to the test suite folder that should be imported and click OK to add the complete test suite to the project. Having this done, the test suite will show up as a child item of the test project in Solution Explorer.

18.12.1.4.4. Configuring the Squish Installation for Test Runs

A Squish package has to be installed on the machine where the test should be run on. For local execution through Visual Studio®, the Squish package has to be installed on the machine where Visual Studio® is running on. For remote execution, the Squish package has to be installed on the machine where the Visual Studio® Test Agent is running on.

To specify the Squish installation that should be used for a specific Squish test, the location of the package has to be configured in the Visual Studio® Squish test. This can be done in different ways, involving environment variables to be set.

18.12.1.4.4.1. Default Squish Installation

When running the Visual Studio® Integration installer, you will be asked to choose the default Squish package. This will create an environment variable called SQUISH_PACKAGE and set it to the path of the package. When executing tests on this machine, the Squish package at the given location will be used unless Section 18.12.1.4.4.2, “Multiple Squish Installations” have been configured.

[Note]Visual Studio® Integration 1.0.7 and before

Up to version 1.0.7, the environment variable SQUISH_DEFAULT_INSTANCE was used to specify the default package. From version 1.1 on, the environment variable SQUISH_PACKAGE has to be used instead. When updating, the setup procedure of the integration will detect the old variable and set the new one for you.

18.12.1.4.4.2. Multiple Squish Installations

There are cases where you want to make multiple Squish installation available. For example, if you you want to to use one testing machine to test a Java and a Qt application, both packages have to be available. This can be done by setting multiple environment variables on the testing machine, each pointing to a different Squish installation. The name of these variables can be freely chosen. The Squish installation that should be used for the execution of a specific test can finally be set using the Test Environment table in the Visual Studio® Squish test view.

For example, if the the environment variable SQUISHFORJAVA has been set to the path of a Squish for Java installation, and this installation should be used for the test, click the button + right beside the Test Environment table. This will open the dialog shown in the screenshot below. Enter package into the field Name and the name of the environment variable set for the Squish package into the field Value, in our example to the name SQUISHFORJAVA. Finally, click OK to add this configuration. It will show up in the Test Environment table.

When executing the test, the integration will lookup the environment variable on the testing machine and use the path that has been assigned to the variable to find the Squish installation.

[Note]Visual Studio® Integration 1.0.7 and before

Up to version 1.0.7, the Squish package had to be set using the key SQUISH_INSTANCE. From version 1.1 on, the key package has to be used instead. The old key will still be checked by the integration to make sure that tests created with earlier version still work.

18.12.1.4.4.3. Setting the Squish Installation Using a Fixed Path

In case the Squish installation path is the same on all machines, for example C:\Squish, it can be avoided to set an evironment variable on the testing machines. Instead, the fixed path can be configured in the Visual Studio® Squish test. Click the button + right beside the Test Environment table to open the dialog for entering a new entry. Enter package into the field Name, and the path of the Squish package into the field Value. Finally, click OK to finish. This will add the path to the Test Environment table as shown below.

18.12.1.5. Executing a Test through Visual Studio®

This section describes how to execute a Squish test through Visual Studio®. Prior to execution, a Visual Studio®Squish test has to be created as explained in Creating the Visual Studio® Test Project (Section 18.12.1.4.1).
18.12.1.5.1. Starting Test Execution through Visual Studio®

The test run can be started by selecting Test|Run and one of the context-sensitive sub-items. For example, selecting Tests in Current Context will start a test run of the currently selected test. By default the test will be executed on the local machine. This is configured in the solution's default test settings file Local.testsettings which can be found in Solution Explorer.

For distributed execution on a remote machine, the test settings have to be changed, or a new test settings file has to be created. To do the latter, right-click Solution Items in Solution Explorer and select Add|New Item.... In the dialog that will be opened, select Installed Templates|Test Settings|Test Settings. You may change the name of the file. Finally, click Add. To edit an existing test settings file, simply double-click it in Solution Explorer.

Either way, a dialog will pop up to let you set the test settings. In this dialog, the Visual Studio® Test Agent instance that should be used for remote test execution has to be set. First of all select Roles. Then select Remote from the combobox Test execution method and enter the hostname of the machine where the Visual Studio® Test Controller the Agent is attached to is running on. Finally, click Apply and Close.

To change the active test settings, select Test|Select Active Test Settings and choose the test settings that should be used for future test runs.

18.12.1.5.2. Checking the Test Results

Once a test run is finished you can open the Test Results by double-clicking the entry in the Test Results view. This will open a new tab showing the result from the test run.

18.12.1.6. Executing a Test through Microsoft® Test Manager

This section explains how to run a Squish test from Microsoft® Test Manager. Before executing a test, some prerequisites have to be met. First of all you have to setup a Visual Studio® Squish test project. The solution containing that project has to be added to Team Foundation Server source control and a Team Foundation Server build has to be started to publish the test artifacts needed by Microsoft® Test Manager. Finally, you have to expose the Squish test as a Visual Studio® Work Item.

The prerequisites that have to be met are described in Preparing Test Execution through Microsoft® Test Manager (Section 18.12.1.6.1). The test execution itself is described in Starting Test Execution through Microsoft® Test Manager (Section 18.12.1.6.2).

18.12.1.6.1. Preparing Test Execution through Microsoft® Test Manager
18.12.1.6.1.1. Preparing the Visual Studio® Squish Test Project

To prepare the test execution via Microsoft® Test Manager, a Squish Visual Studio® test project has to be created as it is explained in Creating a Visual Studio® Squish Test Project (Section 18.12.1.4). The Visual Studio® solution containing this project must then be added Team Foundation Server source control.

To do this, right-click the solution in Solution Explorer and select Add Solution to Source Control from the context menu. Visual Studio® might ask you to select the Team Foundation Server instance and the team project in case you are not already connected. The next step requires you to specify the location of the solution in the Team Foundation Server team project.

After the solution has been added, you have to make sure to check-in your local version. Open the context menu by a right-click on the solution in Solution Explorer, select Check In and confirm the check-in dialog.

18.12.1.6.1.2. Preparing the Team Foundation Server Build

Before an automated test run can be started through Microsoft® Test Manager the test project has to be build via Team Foundation Server to make the test available as a build artifact. In order to queue such a Team Foundation Server build a build definition has to be created. This can be done by selecting View|Team Explorer. In Team Explorer right-click Builds and select New Build Definition from the context-menu as shown in the screenshot below.

This will open the dialog shown below. Most of the settings in the dialog can be left unchanged. But we need to set a drop folder, which is needed by Team Foundation Server to store some build output to. A drop folder can be any Windows share that is accessible by Team Foundation Server. To set the folder, select Build Defaults and enter the location of the shared folder in UNC notation to the field Copy build output the the following drop folder. Make sure to save the build definition.

Now you can queue a new Team Foundation Server build for your test project. The build definition you have just created will show up in Team Explorer. Simply right-click it, select Queue New Build from the context-menu and confirm the dialog that shows up. Once the build is finished, the required build artifacts will be available for test execution through Microsoft® Test Manager.

18.12.1.6.1.3. Publishing the Squish Test as a Work Item

In addition to the Team Foundation Server build artifacts, the Squish test has to be published as a Visual Studio® work item. This makes the the test available as a Microsoft® Test Manager test case. To do this, select Test|Windows|Test View to open the Test View. The Test View lists all Visual Studio® Squish tests of the current solution. To publish a test as a work item, right-click it and select Create Test Case from Test.

This creates a new Microsoft® Test Manager test case work item and opens a new tab for editing its configuration. Most of the settings can be left unchanged. But if you open the Associated Automation tab you will see that the Squish test is not yet associated with this work item. To make the test available as an automated test in Microsoft® Test Manager, click the browse button next to the field Automated test name. This opens the dialog shown below, where you have to select the Squish test suite that should be associated with this work item. Click OK to confirm your selection.

Finally save the test case work item. This may take a short while as the work item has to be published to Microsoft® Test Manager

18.12.1.6.2. Starting Test Execution through Microsoft® Test Manager

Microsoft® Test Manager is a complex application that allows organization and execution of manual and automated tests as part of a test plan. The full feature set of Microsoft® Test Manager is beyond the scope of this manual. This part of the manual explains very basic steps of executing a Squish test through Microsoft® Test Manager only. For further information on how to use Microsoft® Test Manager please refer to Running Tests in the MSDN library.

Please note that the preparations as explained in Preparing Test Execution through Microsoft® Test Manager (Section 18.12.1.6.1) have to be made before you can execute a Squish test.

First of all you have to start Microsoft® Test Manager, and create or open the test plan you want to work with. Now the test case work item that has been created as explained in Section 18.12.1.6.1.3, “Publishing the Squish Test as a Work Item” has to be added to the test plan. To do this, open Testing Center|Plan like it is shown in the screenshot below. Then select the test plan you want to work with in the Contents view, and click the button Add to open the query dialog for searching for test cases.

Next you have to execute a Team Foundation Server query to get a list of available test cases. To do this, click on the button Run that is shown in the screenshot below. Once the query is finished, select the test case from the result list and click Add test cases.

To start the test execution, open Testing Center|Test. Click on the dropdown button Run and select Run with options as shown in the screenshot below:

The Run Options dialog shown below will be opened. First of all specify the Microsoft® Test Manager build that should be used for the test run by selecting it from the dropdown box Build. If no build is available, you have to follow the instructions under Section 18.12.1.6.1.2, “Preparing the Team Foundation Server Build”. Also make sure to deselect Run all tests manually and to select valid Test Settings and and a valid Environment under Automated test runs.

For detailed instructions on setting up an environment, please refer to Creating a Physical Environment to Use for Testing. For detailed instructions on how to create test settings for a test plan, please refer to How to: Create Test Settings for a Test Plan

Finally, click Run to start the execution of the test. This will open the Test Run view that displays the status and result of the test run.

18.12.1.6.3. Checking the Test Results

Please note that the Test Run view of Microsoft® Test Manager is not updated automatically. To check whether the test run has been finished, you have to click on the Refresh button.

The test result can be found as an attachment to the Test Run view. Click on Attachments to make the attachments visible. To open the test result double-click on the file tmiResult.trx. This will start Visual Studio® and open the test result as explained in Checking the Test Results (Section 18.12.1.5.2).

18.12.2. Microsoft® Visual Studio® 2012 Integration

This add-on package tightly integrates Squish with the Microsoft® Visual Studio® 2012 product family. For Visual Studio 2010, please refer to Microsoft® Visual Studio® 2010 Integration (Section 18.12.1).

The integration allows Squish test cases and test suites to be imported into and executed from within Visual Studio®, Microsoft® Test Manager and Team Foundation Server. All that's necessary to make this work is an extra software package provided by froglogic which introduces a new Visual Studio® Squish test type.

18.12.2.1. Obtaining the Visual Studio® Integration

The Visual Studio® Integration is supplied as an executable installer file.
[Note]Separate Purchase

This add-on must be bought separately. Contact for details.

18.12.2.2. Requirements

18.12.2.2.1. Requirements for Test Execution through Visual Studio®

For local execution of Squish tests through Visual Studio® one of the following Visual Studio® editions is required:

  • Professional
  • Premium
  • Ultimate

For distributed execution the Visual Studio® Test Agents are required in addition to one of the Visual Studio® editions mentioned above.

18.12.2.2.2. Requirements for Test Execution through Microsoft® Test Manager

For the execution of Squish tests via Microsoft® Test Manager, the Microsoft® Team Foundation Server is required. Squish tests that should be executed via Microsoft® Test Manager have to be added to Team Foundation Server using one of the following Visual Studio® editions:

  • Professional
  • Premium
  • Ultimate

In addition, the Visual Studio® Test Agents are required.

18.12.2.3. Installing the Visual Studio® Integration

To install the Visual Studio® Integration simply run the installer executable. The integration has to be installed on the machine where Visual Studio® runs on. For distributed test execution through a Visual Studio® Test Agent instance used by Visual Studio® or Microsoft® Test Manager the integration has to be installed on the agent's machine, too. A wizard will guide you through the necessary installation steps.

[Note]Updating from the Visual Studio® Integration 1.0.7 and before

From version 1.1 on, the way to specify the Section 18.12.2.4.4.1, “Default Squish Installation” changed. When updating from an earlier version, the setup procedure will automatically detect the default Squish package that has been set for the previous version of the integration.

18.12.2.4. Creating a Visual Studio® Squish Test Project

18.12.2.4.1. Creating the Visual Studio® Test Project

To open and execute a Squish test from Visual Studio®, a Visual Studio® test project has to be created. To do this select File|New|Project... which will open the dialog shown below. Select Installed|Test Projects|Templates|Test|Unit Test project and enter a name for the project. Finally, create the project by clicking OK.

This creates a Visual Studio® solution containing the test project. The solution and project structure will be shown in Solution Explorer:

Depending on the settings and the default programming language of your Visual Studio® installation, a unit test source file might be created. For example, if the default programming language is set to C#, Visual Studio® will add a file called UnitTest1.cs to the project and automatically open that file for editing. This file is not needed for Squish tests and can be deleted. To do this, right-click the file in Solution Explorer and click Delete. You will be asked to confirm this operation.

18.12.2.4.2. Adding the Visual Studio® Squish Test to the Test Project

Before a Squish test suite can be added a Visual Studio® Squish test has to be created. This is a specialized Visual Studio® test type that is used as a container for Squish test suites, their test cases, shared data and settings.

To create a new test of this type in the test project, right-click the test project in Solution Explorer. Select Add|New Item from the context-menu. The dialog shown in the screenshot below will show up. Select Squish Test from the listed Templates, enter a name into the field Test Name and click OK.

This creates a blank Squish test in the test project. The test will be listed as a child element of the project in Solution Explorer and has the file extension .st. Visual Studio® will automatically open the file in an editor like it is shown in the screenshot below. This editor allows to import the test suite and test cases and to edit further configurations.

18.12.2.4.3. Importing the Squish Test Suite

To select a test suite, click the browse button right beside the field Test Suite. A file dialog will be opened. Browser to the test suite folder that should be imported and click OK to add the complete test suite to the project. Having this done, the test suite will show up as a child item of the test project in Solution Explorer.

18.12.2.4.4. Configuring the Squish Installation for Test Runs

A Squish package has to be installed on the machine where the test should be run on. For local execution through Visual Studio®, the Squish package has to be installed on the machine where Visual Studio® is running on. For remote execution, the Squish package has to be installed on the machine where the Visual Studio® Test Agent is running on.

To specify the Squish installation that should be used for a specific Squish test, the location of the package has to be configured in the Visual Studio® Squish test. This can be done in different ways, involving environment variables to be set.

18.12.2.4.4.1. Default Squish Installation

When running the Visual Studio® Integration installer, you will be asked to choose the default Squish package. This will create an environment variable called SQUISH_PACKAGE and set it to the path of the package. When executing tests on this machine, the Squish package at the given location will be used unless Section 18.12.2.4.4.2, “Multiple Squish Installations” have been configured.

[Note]Visual Studio® Integration 1.0.7 and before

Up to version 1.0.7, the environment variable SQUISH_DEFAULT_INSTANCE was used to specify the default package. From version 1.1 on, the environment variable SQUISH_PACKAGE has to be used instead. When updating, the setup procedure of the integration will detect the old variable and set the new one for you.

18.12.2.4.4.2. Multiple Squish Installations

There are cases where you want to make multiple Squish installation available. For example, if you you want to to use one testing machine to test a Java and a Qt application, both packages have to be available. This can be done by setting multiple environment variables on the testing machine, each pointing to a different Squish installation. The name of these variables can be freely chosen. The Squish installation that should be used for the execution of a specific test can finally be set using the Test Environment table in the Visual Studio® Squish test view.

For example, if the the environment variable SQUISHFORJAVA has been set to the path of a Squish for Java installation, and this installation should be used for the test, click the button + right beside the Test Environment table. This will open the dialog shown in the screenshot below. Enter package into the field Name and the name of the environment variable set for the Squish package into the field Value, in our example to the name SQUISHFORJAVA. Finally, click OK to add this configuration. It will show up in the Test Environment table.

When executing the test, the integration will lookup the environment variable on the testing machine and use the path that has been assigned to the variable to find the Squish installation.

[Note]Visual Studio® Integration 1.0.7 and before

Up to version 1.0.7, the Squish package had to be set using the key SQUISH_INSTANCE. From version 1.1 on, the key package has to be used instead. The old key will still be checked by the integration to make sure that tests created with earlier version still work.

18.12.2.4.4.3. Setting the Squish Installation Using a Fixed Path

In case the Squish installation path is the same on all machines, for example C:\Squish, it can be avoided to set an evironment variable on the testing machines. Instead, the fixed path can be configured in the Visual Studio® Squish test. Click the button + right beside the Test Environment table to open the dialog for entering a new entry. Enter package into the field Name, and the path of the Squish package into the field Value. Finally, click OK to finish. This will add the path to the Test Environment table as shown below.

18.12.2.5. Executing a Test through Visual Studio®

This section describes how to execute a Squish test through Visual Studio®. Prior to execution, a Visual Studio®Squish test has to be created as explained in Creating the Visual Studio® Test Project (Section 18.12.2.4.1).
18.12.2.5.1. Starting Test Execution through Visual Studio®

To run a test first open the Test Explorer by selecting menu Test|Windows|Test Explorer. You may have to save the Squish test to make it show up in Test Explorer.

To start the test execution click Run All or Run....

18.12.2.5.2. Checking the Test Results

To review the Test Results of a finished test run, selecte the test in Test Explorer. This will show the details of the test run at the bottom of Test Explorer. Open the Test Result by clicking the link Output.

Click the .trx file in the Attachements list of the Test Output view that is opened. This will open the Test Results view. To see the details of the test run, double-click the result in the Test Results view.

18.12.2.6. Executing a Test through Microsoft® Test Manager

This section explains how to run a Squish test from Microsoft® Test Manager. Before executing a test, some prerequisites have to be met. First of all you have to setup a Visual Studio® Squish test project. The solution containing that project has to be added to Team Foundation Server source control and a Team Foundation Server build has to be started to publish the test artifacts needed by Microsoft® Test Manager. Finally, you have to expose the Squish test as a Visual Studio® Work Item.

The prerequisites that have to be met are described in Preparing Test Execution through Microsoft® Test Manager (Section 18.12.2.6.1). The test execution itself is described in Starting Test Execution through Microsoft® Test Manager (Section 18.12.2.6.2).

18.12.2.6.1. Preparing Test Execution through Microsoft® Test Manager
18.12.2.6.1.1. Preparing the Visual Studio® Squish Test Project

To prepare the test execution via Microsoft® Test Manager, a Squish Visual Studio® test project has to be created as it is explained in Creating a Visual Studio® Squish Test Project (Section 18.12.2.4). The Visual Studio® solution containing this project must then be added Team Foundation Server source control.

To do this, right-click the solution in Solution Explorer and select Add Solution to Source Control from the context menu. Visual Studio® might ask you to select the Team Foundation Server instance and the team project in case you are not already connected. The next step requires you to specify the location of the solution in the Team Foundation Server team project.

After the solution has been added, you have to make sure to check-in your local version. Open the context menu by a right-click on the solution in Solution Explorer, select Check In and confirm the check-in dialog.

18.12.2.6.1.2. Preparing the Team Foundation Server Build

Before an automated test run can be started through Microsoft® Test Manager the test project has to be build via Team Foundation Server to make the test available as a build artifact. In order to queue such a Team Foundation Server build a build definition has to be created. This can be done by selecting View|Team Explorer. In Team Explorer click Builds.

This will open the dialog shown below. Most of the settings in the dialog can be left unchanged. But we need to set a drop folder, which is needed by Team Foundation Server to store some build output to. A drop folder can be any Windows share that is accessible by Team Foundation Server. To set the folder, select Build Defaults and enter the location of the shared folder in UNC notation to the field Copy build output the the following drop folder as shown below. Make sure to save the build definition.

Now you can queue a new Team Foundation Server build for your test project. The build definition you have just created will show up in Team Explorer. Simply right-click it, select Queue New Build from the context-menu and confirm the dialog that shows up. Once the build is finished, the required build artifacts will be available for test execution through Microsoft® Test Manager.

18.12.2.6.1.3. Publishing the Squish Test as a Work Item

In addition to the Team Foundation Server build artifacts, the Squish test has to be published as a Visual Studio® work item. This makes the the test available as a Microsoft® Test Manager test case. To do this, click Work Items in Team Explorer. Select New Work Item|Test Case.

This creates a new Microsoft® Test Manager test case work item and opens a new tab for editing its configuration. Most of the settings can be left unchanged. But if you open the Associated Automation tab you will see that the Squish test is not yet associated with this work item. To make the test available as an automated test in Microsoft® Test Manager, click the browse button next to the field Automated test name. This opens the dialog shown below, where you have to select the Squish test suite that should be associated with this work item. Enter a name for the test case work item and click OK to confirm your selection.

Finally save the test case work item. This may take a short while as the work item has to be published to Microsoft® Test Manager

18.12.2.6.2. Starting Test Execution through Microsoft® Test Manager

Microsoft® Test Manager is a complex application that allows organization and execution of manual and automated tests as part of a test plan. The full feature set of Microsoft® Test Manager is beyond the scope of this manual. This part of the manual explains very basic steps of executing a Squish test through Microsoft® Test Manager only. For further information on how to use Microsoft® Test Manager please refer to Running Tests in the MSDN library.

Please note that the preparations as explained in Preparing Test Execution through Microsoft® Test Manager (Section 18.12.2.6.1) have to be made before you can execute a Squish test.

First of all you have to start Microsoft® Test Manager, and create or open the test plan you want to work with. Now the test case work item that has been created as explained in Section 18.12.2.6.1.3, “Publishing the Squish Test as a Work Item” has to be added to the test plan. To do this, open Testing Center|Plan like it is shown in the screenshot below. Then select the test plan you want to work with in the Contents view, and click the button Add to open the query dialog for searching for test cases.

Next you have to execute a Team Foundation Server query to get a list of available test cases. To do this, click on the button Run that is shown in the screenshot below. Once the query is finished, select the test case from the result list and click Add test cases.

To start the test execution, open Testing Center|Test. Click on the dropdown button Run and select Run with options as shown in the screenshot below:

The Run Options dialog shown below will be opened. First of all specify the Microsoft® Test Manager build that should be used for the test run by selecting it from the dropdown box Build. If no build is available, you have to follow the instructions under Section 18.12.2.6.1.2, “Preparing the Team Foundation Server Build”. Also make sure to deselect Run all tests manually and to select valid Test Settings and and a valid Environment under Automated test runs.

For detailed instructions on setting up an environment, please refer to Creating a Physical Environment to Use for Testing. For detailed instructions on how to create test settings for a test plan, please refer to How to: Create Test Settings for a Test Plan

Finally, click Run to start the execution of the test. This will open the Test Run view that displays the status and result of the test run.

18.12.2.6.3. Checking the Test Results

Please note that the Test Run view of Microsoft® Test Manager is not updated automatically. To check whether the test run has been finished, you have to click on the Refresh button.

The test result can be found as an attachment to the Test Run view. Click on Attachments to make the attachments visible. To open the test result double-click on the file tmiResult.trx. This will start Visual Studio® and open the test result as explained in Checking the Test Results (Section 18.12.2.5.2).