Query based on build and test integration fields

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013

Build and test integration work item fields support the following actions:

  • Associate bugs with the builds where they were found or fixed
  • Query for bugs associated with a build
  • Mark test cases as either manual or automated, and store information to support automated test cases
  • For test cases and shared steps, define the action and validation steps and the data that are used to perform tests.

Useful filters

Filter for Include these query clauses
Automated test cases         Work Item Type _ = _ Test Case
And Automation Status _ = _ Automated
Query-based test suites         Work Item Type _ = _ Test Suite
And Test Suite Type _ = _ Query Based
Requirement-based test suites         Work Item Type _ = _ Test Suite
And Test Suite Type _ = _ Requirement Based

List bugs and the test cases that test them

Open a new query, set the query type to Work items and direct links. Filter for bugs in the top-level and add the filter for Test Cases in the linked work items filter.

List bugs and the test cases that test them

Note

You can't construct a query that shows a hierarchical view of Test Plans, Test Suites, and Test Cases. These items aren't linked together using parent-child link types. You can view the hierarchy through the Test Plans page of the Test hub.

Build and test data fields

The following table describes the fields that are defined in one or more of the test WITs. For information about data types and field attributes, see Define and modify work item fields.

To customize a field or pick list, see Add or modify a field to support queries, reports, and workflow.

Field name Description Work item type

Automation Status 1

The status of a test case. You can specify the following values:

  • Automated

  • Not Automated

  • Planned

To run automated tests, see Automate a test case in Microsoft Test Manager.

Reference name=Microsoft.VSTS.TCM.AutomationStatus, Data type=String

Test Case

Found In 2

Product build number, also known as a revision, in which a bug was found.

Reference name=Microsoft.VSTS.Build.FoundIn, Data type=String

Note: You can also use the Found in build link type to link a work item to a build. This link type is available from VSTS and only work with the current build processes (not XAML builds).
Bug

Integration Build 2

Product build number that incorporates the code or fixes a bug.

Reference name=Microsoft.VSTS.Build.IntegrationBuild, Data type=String

Note: You can also use the Integrated in build link type to link a work item to a build. This link type is available from VSTS and only work with the current build processes (not XAML builds).
All

Issue

Indicates that the Shared Steps is associated with an expected result. Allowed values are Yes and No.

Reference name=Microsoft.VSTS.Common.Issue, Data type=String

Shared Steps

Parameters 3

Contains the parameters to use when running a manual test.

Microsoft.VSTS.TCM.Parameters, Data type=HTML

Shared Parameters, Shared Steps, Test Case

Steps

The action and validation steps that are required to perform the test.

Microsoft.VSTS.TCM.Steps, Data type=TestStepsControl

Shared Steps, Test Case

System Info

Information about the software and system configuration that is relevant to the test.

Microsoft.VSTS.TCM.SystemInfo, Data type=HTML

Bug, Feedback Response
Repro Steps (or Steps to reproduce)

The steps that are required to reproduce unexpected behavior. Capture enough information so that other team members can understand the full impact of the problem as well as whether they have fixed the bug. This includes actions taken to find or reproduce the bug and expected behavior.

Reference name=Microsoft.VSTS.TCM.ReproSteps, Data type=HTML

Bug

Test Suite Type 1,4

The test suite category. Allowed values are:

  • Query Based: Use to group together test cases that have a particular characteristic - for example, all the tests that have Priority=1. The suite will automatically include every test case that is returned by the query that you define.

  • Static: Use to group together test cases designed to track the test status of backlog items. Each test case that you add to a requirement-based test suite is automatically linked to the backlog item.

  • Requirement Based: Use to group together test cases with any characteristics or test suites.

For more information, see Create a test plan.

Reference name=Microsoft.VSTS.TCM.TestSuiteType, Data type=String

Test Suite

Notes

  1. Do not customize the pick list for these fields. The system accepts only those values listed.
  2. By adding a GLOBALLIST element to the FIELD definition, you can provide a drop-down menu of builds that users can choose from. To learn how, see Fields that support integration with test, build, and version control.
  3. Requires TFS 2013.2 or TFS 2013.3 to be installed on the application-tier server and existing team projects to be updated to support Shared Parameters. To learn more, see Configure features after a TFS upgrade.
  4. Requires TFS 2013.3 to be installed on the application-tier server and existing team projects to be updated to support Test Plan and Test Suite.

Additional fields

The following fields do not appear on work item forms, but these fields are tracked for test cases or test suites. You can use some of these fields to filter queries and create reports. (None of these fields are added to the data warehouse nor indexed.)

Field name Description Work item type

Automated Test Storage

The assembly that contains the test that automates the test case.

Reference name=Microsoft.VSTS.TCM.AutomatedTestStorage, Data type=String

Test Case

Automated Test Type

The type of test that automates the test case.

Reference name=Microsoft.VSTS.TCM.AutomatedTestType, Data type=String

Test Case

AutomatedTestId

The ID of the test that automates the test case.

Reference name=Microsoft.VSTS.TCM.AutomatedTestId, Data type=String

Test Case

AutomatedTestName

The name of the test that is used to automate the test case.

Reference name=Microsoft.VSTS.TCM.AutomatedTestName, Data type=String

Test Case

LocalDataSource

The local data source that supports the test.

Reference name=Microsoft.VSTS.TCM.LocalDataSource, Data type=HTML

Test Case

Query Text

Field used to capture the query defined for a Query-based suite type.

Reference name=Microsoft.VSTS.TCM.QueryText, Data type=PlainText

Test Suite

Test Suite Audit 1

Tracks additional operations performed when modifying a test suite, for example: adding tests to a test suite or changing configurations. This field can be viewed through the History tab or through a separate query. There will be a consolidated history view, including changes performed to work items field and changes resulting from related artifacts such as test points and configurations.

Reference name=Microsoft.VSTS.TCM.TestSuiteAudit, Data type=PlainText

Test Suite

Test Suite Type ID 1, 2

A system assigned value that corresponds to the test suite category and only applicable to test suites. Assigned values are:

  • 1 (Static)

  • 2 (Query-based)

  • 3 (Requirement- based)

Reference name=Microsoft.VSTS.TCM.TestSuiteTypeId, Data type=Integer

Test Suite

Notes

  1. Requires TFS 2013.3 to be installed on the application-tier server and existing team projects to be updated to support Test Plan and Test Suite.
  2. Do not customize the pick list for these fields. The system accepts only those values listed.

Availability of test work item types (TFS)

Test Manager and the test work item types (WITs) use the following fields to track test plans, progress, and results. The availability of the WITs is based on the version of TFS installed on your application-tier. To learn more about using these WITs, see Create a test plan.

TFS 2013.0 TFS 2013.2 TFS 2013.3 and later versions
  • Bug
  • Shared Steps
  • Test Case
  • Bug
  • Shared Parameters
  • Shared Steps
  • Test Case
  • Bug
  • Shared Parameters
  • Shared Steps
  • Test Case
  • Test Plan
  • Test Suite

To learn more about upgrading an existing team project to get WITs that your team project currently doesn't have, see Configure features after an upgrade.