Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How to determine which Test Definitions are associated with a specified attribute?

How to determine which Test Definitions are associated with a specified attribute?

The following query returns all Test Definitions found in all projects which is associated with the specified attribute search name. Please copy the query into a report data query by selecting "Advanced Query" in the report view.


// Borland Code
// Date: 15 April 2009

// Determine which Test Definitions are associated with a specified attribute
// Return the Test Definition, the Attribute Name and the Attribute value

// Create a new advanced query report in SCTM, copy and paste the SQL query below into the report, or
// Open SCTM database using SQL Enterprise Manager or equivalent
// Run the SQL query below against SCTM database

SELECT SCC_Projects.ProjectName AS [Project Name], TM_TestContainerName.Name AS [Test Container], TM_TestDefName.Name AS [Folder/Next Hierarchy],
TM_TestPlanNodes.Name AS [Test Definition], TM_Attributes.Name AS [Attribute Name], TM_AttributeOptions.OptionValue AS [Attribute Value]
FROM TM_AttributeOptions INNER JOIN
TM_NodeAttributeOptions ON TM_AttributeOptions.OptionID_pk = TM_NodeAttributeOptions.OptionID_pk_fk INNER JOIN
TM_TestDefinitions INNER JOIN
TM_TestPlanNodes ON TM_TestDefinitions.TestPlanNodeID_pk_fk = TM_TestPlanNodes.NodeID_pk INNER JOIN
TM_PlanTreePaths AS TM_PlanTreePaths_1 ON TM_TestPlanNodes.NodeID_pk = TM_PlanTreePaths_1.NodeID_pk_fk INNER JOIN
TM_TestContainers AS TM_TestContainers_1 ON TM_PlanTreePaths_1.ParentNodeID_pk_fk = TM_TestContainers_1.TestContainerID_pk_fk INNER JOIN
SCC_Projects ON TM_TestContainers_1.ProjectID_fk = SCC_Projects.ProjectID_pk INNER JOIN
TM_TestPlanNodes AS TM_TestDefName ON TM_TestPlanNodes.ParentNodeID_fk = TM_TestDefName.NodeID_pk INNER JOIN
TM_TestPlanNodes AS TM_TestContainerName ON TM_PlanTreePaths_1.ParentNodeID_pk_fk = TM_TestContainerName.NodeID_pk INNER JOIN
LQM_Tests ON TM_TestPlanNodes.NodeID_pk = LQM_Tests.TestID_pk INNER JOIN
TM_Attributes ON SCC_Projects.ProjectID_pk = TM_Attributes.ProjectID_pk_fk ON
TM_AttributeOptions.AttributeID_pk_fk = TM_Attributes.AttributeID_pk AND
TM_NodeAttributeOptions.NodeID_pk_fk = TM_TestPlanNodes.NodeID_pk
WHERE (TM_Attributes.Name LIKE "A%")



Note: Please specify the first letter (or first sequence of letters) of the attribute name you wish to search for in the "WHERE" clause "A%".

Find SCTM TestDefAttribute.txt
Old KB# 29712

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 20:39
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.