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 do I determine Test Definitions in SilkCentral TestManager with a Data Source association?

How do I determine Test Definitions in SilkCentral TestManager with a Data Source association?

Problem:

How do I determine Test Definitions in SilkCentral TestManager with a Data Source association?

Resolution:

In a large SilkCentral Test Manager (SCTM) project where there are Test Definitions which have a Data Source association, there may be Data Sources which are no longer used and are no longer required to continue to occupy memory in the Database.

In order to delete these unnecessary Data Sources, you would first have to remove any associations the Data Source may have with a Test Definition. In a large SCTM project, this would mean searching through an entire list of Test Definitions and checking which has a Data Source association; the reason for this is because there is currently no easy way to perform this action.

However, a workaround would be to run the following SQL query against your SCTM database which you can view using SQL Server Enterprise Manager or equivalent. The SQL query searches through all test definitions and retrieves any occurence of a Test Definition with a Data Source association and also returns the Test Container and the Project Name. From this result, much of the work of searching through every Test Definition is removed and you only need to go directly to the correct Test Definition.


// Borland Code VOzohili
// Date: 8 August 2008

// Deletion of Datasources in SCTM that are used in several projects
// 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_TestPlanNodes_1.Name AS [Test Container Name],
TM_TestPlanNodes.Name AS [Test Definition Name],
CASE WHEN LQM_Tests.a_dd_datasource <> 0 THEN "TRUE" ELSE "FALSE" END AS [Has Data Source],
CASE WHEN LQM_Tests.a_datadriven = 1 THEN "ACTIVE" ELSE "INACTIVE" END AS [Is Data Driven],
SCC_DataSourceProfiles.Name AS [Data Source Name], SCC_SourceControlProfiles.Name AS [Source Control Name],
SCC_Products.ProductCode AS [Product Name]
FROM SCC_DataSourceProfiles INNER JOIN
SCC_SourceControlProfiles ON SCC_DataSourceProfiles.SrcCtrlProfileID_fk = SCC_SourceControlProfiles.SourceControlID_pk INNER JOIN
LQM_Tests INNER JOIN
TM_TestDefinitions ON LQM_Tests.TestID_pk = TM_TestDefinitions.TestPlanNodeID_pk_fk ON
SCC_DataSourceProfiles.ProfileID_pk = LQM_Tests.a_dd_datasource INNER JOIN
TM_TestPlanNodes ON TM_TestDefinitions.TestPlanNodeID_pk_fk = TM_TestPlanNodes.NodeID_pk INNER JOIN
TM_TestContainers ON TM_TestPlanNodes.ParentNodeID_fk = TM_TestContainers.TestContainerID_pk_fk INNER JOIN
TM_TestPlanNodes AS TM_TestPlanNodes_1 ON TM_TestContainers.TestContainerID_pk_fk = TM_TestPlanNodes_1.NodeID_pk INNER JOIN
SCC_Projects ON LQM_Tests.ProjectID_fk = SCC_Projects.ProjectID_pk INNER JOIN
SCC_Products ON LQM_Tests.ProductID_fk = SCC_Products.ProductID_pk
WHERE (LQM_Tests.a_dd_datasource <> 0) AND (SCC_DataSourceProfiles.Name LIKE "%") AND (LQM_Tests.a_datadriven <> 2)


Note: Once the Data Source has been identified, in order to remove its association to the Test Definition, you would have point this Test Definition to a different Data Source as it is currently not possible to delete a Data Source association from Test Plan view.


Related documents:

Old KB# 25110

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 19:52
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.