Absent Member.
Absent Member.
2518 views

DB Query: Get all linked children of a test definition

Hi,

I use linked test container for test executions on different hardware platforms. For  reporting,  I need a SQL query that returns a list of all linked children of a given test definition, but I have now idea which tables/views are involved. I would appreciate any hint.

With best regards,

Bernd

0 Likes
4 Replies
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Hi Bernd,

linked nodes are normal nodes in the TM_TestPlanNodes and TM_PlanTreePath tables, they only have a "CloneNodeID_fk" set that references the original node.

So the following query list all nodes below the given parent node ID and includes the "original" node ID if linked from another container:

select tpn.NodeID_pk NodeID, tpn.Name, tpn.CloneNodeID_fk "LinkedFrom" from RTM_V_TestHierarchie h

inner join TM_PlanTreePaths ptp on ptp.NodeID_pk_fk = h.NodeID_pk and ptp.ParentNodeID_pk_fk = ?

inner join TM_TestPlanNodes tpn on tpn.NodeID_pk = ptp.NodeID_pk_fk

Did you consider using configuration suites for configuration tests instead of linking to other containers?

Regards,

Roland

0 Likes
Micro Focus Expert
Micro Focus Expert

Hello Bernd

Are you hoping to return the children of a given test container?  If so, please see SQL below that will return test definition and test step information for a parent Test Container. This uses the following SilkCentral views - TM_V_TestDefinitions and TM_V_ManualSteps. It takes Test Container ID as a parameter.

SELECT .[TestContainerName],

.[ProjectID],

.[TestID] AS [TestDef ID],

.[TestName] AS [TestDef Name],

[ms].[Name] [TestStep Name],

[ms].[Description][TestStep Description],

[ms].[Result] [TestStep Result]

FROM [TM_V_TestDefinitions] td left outer join [TM_V_ManualSteps] ms

on .[TestID] = [ms].[TestAssetNodeID_fk]

WHERE .[TestContainerID] = '<TestContainerID>'

Please let me know if this helps?

0 Likes
Absent Member.
Absent Member.

Hi Roland,

this is exactly the piece of information I needed. Thank you very much!

[quote user="Roland Kern"]

Did you consider using configuration suites for configuration tests instead of linking to other containers?

[/quote]

Yes I did. I am still not sure,  but I think linking to other containers may be the better solution. I did another posting about my SCTM use case and my plan to solve the "testing embedded real-time software" challenge: http://community.microfocus.com/borland/test/silk_central/f/31/t/8327.aspx

I would be glad, if you could give me some advise.

With best regards,

Bernd

0 Likes
Absent Member.
Absent Member.

Hi Mark,

thank you very much for your reply. My problem was to identify linked test containers, not "regular" children to a test container. Roland's previous posting solved all my problems.

With best regards,

Bernd

0 Likes
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.