Work Item Query Language - Work Item Query reference

How to use Work Item Query Language (WIQL) to programmatically query for test points.

A WIQL query consists of a SELECT statement (similar to that of the SQL language) that lists the fields to be returned as columns in the result set. (Learn more.)

In TestArchitect, you might use a WIQL query to specify the location(s), in terms of test points, to which TA results are to be uploaded to TFS.


Typical query

A WIQL query consists of a SELECT statement and, optionally, a qualifying WHERE clause.
The basic syntax is:

FROM TestPoint
[WHERE Conditions]


Query to upload TA test results to TFS tests assigned to specific configuration

    SELECT * 
    FROM TestPoint
    WHERE PlanId=<ID of test plan> AND 
         SuiteId=<ID of test suite> AND 
         ConfigurationId=<ID of configuration>


Suppose that you’d like to upload results to TFS with the following information:

The query selects test points where the PlanId field equals 3160, the SuiteId field equals 3189, and the ConfigurationId field equals 20. The query returns all information of the test point including test case ID of the return set. Note that, as discussed above, test case ID is what we need to retrieve in the returned result set.

       FROM TestPoint
       WHERE PlanId=3160 AND 
       SuiteId=3189 AND 

When you want to traverse TFS sub test suites recursively, change SuiteId into RecursiveSuiteId. In this case, all test cases below the specified test suite that satisfy the condition are returned.

Copyright © 2021 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1(800) 322-0333