Defining the Initial Configuration of Test Manager

By using the plug-in for Microsoft Test Manager, you can define a team project's initial test management setup. You can define settings such as test variables and test configurations that combine test variables. For example, you can define the hardware platform, the operating system, the browser version, or another type of hardware or software to be used for testing, and then you can define test configurations that combine these variables. In addition, you can customize the default test settings and the list of valid test resolution states. After you create a team project, you can modify each test configuration through Microsoft Test Manager except for test resolution states.

The test management plug-in file is provided with the process templates for Microsoft Solutions Framework (MSF). Microsoft Test Manager is available with Visual Studio 2010 Ultimate and Visual Studio Test Professional 2010. For more information, see Testing the Application.

Note

You can customize the initial security configuration for test activities by assigning them in the GroupsandPermissions.xml plug-in file. For more information, see Configuring Initial Groups, Members, and Permissions.

The following table summarizes the names of the file, the folder, and the plug-in for the process templates for MSF.

File name:

testmanagement.xml

Folder name:

Test Management

Plug-in name:

Microsoft.ProjectCreationWizard.TestManagement

Note

You can change the names of the XML file and the folder but not the plug-in. Team Foundation Server does not include a mechanism for the deployment of client-side plug-ins, policies, or other modifications. If you want to deploy plug-ins, policies, or other modifications to Team Explorer, you must use your own distribution and installation program.

In this topic

  • Test Management Tasks and Dependencies

  • Defining Test Environments

  • Defining Test Configurations

  • Defining the Resolution States for Test

  • Defining the Default Test Settings

Test Management Tasks and Dependencies

In the testmanagement.xml file, you specify one or more tasks and their dependencies. The plug-in file specifies four tasks, and each task uploads a test management file. The testconfiguration.xml file depends on the information that is specified in the testvariable.xml file. For more information about the task, taskXml, and dependency elements, see Defining the Tasks to Process a Plug-in and Defining Dependencies for Task Groups and Tasks in Plug-in Files.

The following code represents the default testmanagement.xml file that is defined for the MSF process templates:

<?xml version="1.0" encoding="utf-8"?>
<tasks>
  <task id="TestVariable" name="Default test variables" plugin="Microsoft.ProjectCreationWizard.TestManagement" completionMessage="Default test variables created">
    <taskXml>
      <TestVariables fileName="Test Management\TestVariable.xml" />
    </taskXml>
  </task>
  <task id="TestConfiguration" name="Default test configurations" plugin="Microsoft.ProjectCreationWizard.TestManagement" completionMessage="Default test configurations created">
    <dependencies>
      <dependency taskId="TestVariable" />
    </dependencies>
    <taskXml>
      <TestConfigurations fileName="Test Management\TestConfiguration.xml" />
    </taskXml>
  </task>
  <task id="TestSettings" name="Default test settings" plugin="Microsoft.ProjectCreationWizard.TestManagement" completionMessage="Default test settings created">
    <taskXml>
      <TestSettings fileName="Test Management\TestSettings.xml" />
    </taskXml>
  </task>
  <task id="TestResolutionState" name="Default test resolution states" plugin="Microsoft.ProjectCreationWizard.TestManagement" completionMessage="Default test resolution states created">
    <taskXml>
      <TestResolutionStates fileName="Test Management\TestResolutionState.xml" />
    </taskXml>
  </task>
</tasks>

Defining Test Configuration Variables

You use the TestVariable and AllowedValue elements to define test configuration variables. You can define any number of test configuration variables and their valid values. The following values are defined in the testvariable.xml file in the MSF process templates:

  • Operating systems:

    • Windows Vista

    • Windows XP

  • Default browsers:

    • Internet Explorer 7.0

    • Internet Explorer 8.0

    • Firefox 3.0

After the project is created, you can modify these variables and create other variables. For more information, see Defining Your Test Matrix Using Test Configurations.

The TestVariable element must be encapsulated within its corresponding container element: TestVariables. You use the following syntax structure for these elements:

<TestVariables>
   <TestVariable name="VariableName" name="Operating System" description="Description of VariableName">
        <AllowedValue value ="Name of Allowed Value"/>
    </TestVariable>
</TestVariables>

You use the following syntax for the test variables that are defined in the MSF process templates:

<?xml version="1.0" encoding="utf-8" ?>
<TestVariables>
    <TestVariable name="Operating System" description="Default operating systems">
        <AllowedValue value ="Vista" />
        <AllowedValue value ="XP" />
    </TestVariable>
    <TestVariable name="Browser" description="Default browsers">
        <AllowedValue value ="Internet Explorer 7.0" />
        <AllowedValue value ="Internet Explorer 8.0" />
        <AllowedValue value ="FireFox 3.0" />
    </TestVariable>
</TestVariables>

Defining Test Configurations

You use the TestConfiguration and TestVariable elements to define test configurations that combine one or more test configuration variables. One default configuration is defined in the testconfiguration.xml file in the MSF process template: Windows Vista and Internet Explorer 7.0. After the project is created, you can delete these configurations and create other configurations. For more information, see How to: Create Test Configurations.

You must enscapsulate the TestConfiguration element within its corresponding container element: TestConfigurations. You use the following syntax structure for these elements:

<TestConfigurations>
    <TestConfiguration name="Test Configuration Name" description=" Test Configuration Description " state="active" isdefault="true | false">
        <TestVariable name="VariableName" value="Variable Value" />
        <TestVariable name="VariableName" value="Variable Value" />
    </TestConfiguration>
</TestConfigurations>

The following table describes the attributes for the TestConfiguration element.

Attribute

Description

state

Identifies the test configuration as active or inactive.

isdefault

Identifies the test configuration as a default configuration.

You use the following syntax for the test configurations that are defined in the MSF process templates.

<?xml version="1.0" encoding="utf-8" ?>
<TestConfigurations>
   <TestConfiguration name="Vista and IE 7" description="Default operating system and browser for testing" state="active" isdefault="true">
        <TestVariable name="Operating System" value="Vista" />
        <TestVariable name="Browser" value="Internet Explorer 7.0" />
   </TestConfiguration>
</TestConfigurations>

Defining Resolution States for Test

You use the TestResolutionState element to specify the reasons why a test failed. The following states are defined in the testresolutionstate.xml in the MSF process template: Needs investigation, Test issue, Product issue, and Configuration issue.

Note

You cannot change these states or add states after the team project is created.

You must encapsulate the TestResolutionState element within its corresponding container element: TestResolutionStates.

You use the following syntax structure for these elements:

<TestResolutionStates>
    <TestResolutionState name="ResolutionName" />
</TestResolutionStates>

You use the following syntax for the resolution states that are defined in the MSF process templates.

<?xml version="1.0" encoding="utf-8" ?>
<TestResolutionStates>
    <TestResolutionState name="Needs investigation" />
    <TestResolutionState name="Test issue" />
    <TestResolutionState name="Product issue" />
    <TestResolutionState name="Configuration issue" />
</TestResolutionStates>

Defining the Default Test Settings for a Local Test Run

You use the TestSetting element to specify the name of the file to use when a test is run. The following file is defined in the testsettings.xml in the MSF process template: localrun.testsettings. For more information, see Setting Up Test Machines to Run Tests or Collect Data.

You must encapsulate the TestSetting element within its corresponding container element: TestSettings. You use the following syntax structure for these elements:

<TestSettings>
    <TestSetting name="Name of Test Setting " filename="FileName" />
</TestSettings>

You use the following syntax for the testsettings.xml file that is defined in the MSF process templates.

<?xml version="1.0" encoding="utf-8" ?>
<TestSettings>
    <TestSetting name="Local Test Run" filename="localrun.testsettings" />
</TestSettings>

See Also

Concepts

Testing the Application

Customizing Functional Areas within a Process Template