You are not logged in. Click here to log in.

Codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  Test Management

Check Test Step Reuse at codebeamer Upgrade



Since codebeamer release 22.10-LTS (GINA), the performance is improved at test step reuse. To achieve better performance, a data update might be required before upgrading the system to codebeamer 22.10-LTS (GINA) or newer versions. For the data upgrade, a Test Steps table field must exist in the test case type trackers.

Application Configuration

The following section in the application configuration enables renaming table fields:

"testManagement": {
  "disableEditingBuiltInFieldsName" : false }


Database Check

Because of the above configuration option, Test Steps table fields must be checked before codebeamer upgrade. If the name of the field has been changed, it must be restored to Test Steps.


Find the Tracker and Project IDs Before Starting the Upgrade to 22.10

To check if the database contains a renamed Test Steps table field, run the following query. The query returns the IDs, name and Project IDs of the trackers where the field has been renamed.



WITH TEST_STEPS_FIELDS as (SELECT FIELD.parent_id, FIELD.reference_id
                           FROM object FIELD
                                    INNER JOIN object_revision FIELD_REV
                                               ON FIELD.id = FIELD_REV.object_id AND FIELD.revision = FIELD_REV.revision
                           WHERE FIELD.type_id = 25
                             AND FIELD_REV.name = 'Test Steps')
SELECT TEST_CASE_TRACKER.id      as tracker_id,
       TRACKER_REV_ART.name as tracker_name,
       TEST_CASE_TRACKER.proj_id as project_id
FROM task_type TEST_CASE_TRACKER
         INNER JOIN object TRACKER_ARTIFACT
                    on TEST_CASE_TRACKER.id = TRACKER_ARTIFACT.id
         INNER JOIN object_revision TRACKER_REV_ART ON TRACKER_ARTIFACT.id = TRACKER_REV_ART.object_id AND TRACKER_ARTIFACT.revision = TRACKER_REV_ART.revision
         LEFT OUTER JOIN TEST_STEPS_FIELDS ON TEST_CASE_TRACKER.id = TEST_STEPS_FIELDS.parent_id
WHERE TEST_CASE_TRACKER.desc_id = 102
  AND TEST_CASE_TRACKER.template_id is NULL
  AND TRACKER_ARTIFACT.deleted IN (0, 1)
  AND TEST_STEPS_FIELDS.reference_id IS NULL



Find the Tracker and Project IDs After an Unsuccessful Upgrade to 22.10

To check if the database contains a renamed Test Steps table field, run the following query. The query returns the IDs, name and Project IDs of the trackers where the field has been renamed.



WITH TEST_STEPS_FIELDS as (SELECT FIELD.parent_id, FIELD.reference_id
                           FROM object FIELD
                                    INNER JOIN object_revision FIELD_REV
                                               ON FIELD.id = FIELD_REV.object_id AND FIELD.revision = FIELD_REV.revision
                           WHERE FIELD.type_id = 25
                             AND FIELD_REV.name = 'Test Steps')
SELECT TEST_CASE_TRACKER.id      as tracker_id,
       TRACKER_REV_ART.name as tracker_name,
       TEST_CASE_TRACKER.proj_id as project_id
FROM task_type TEST_CASE_TRACKER
         INNER JOIN object TRACKER_ARTIFACT
                    on TEST_CASE_TRACKER.id = TRACKER_ARTIFACT.id
         INNER JOIN object_revision TRACKER_REV_ART ON TRACKER_ARTIFACT.id = TRACKER_REV_ART.object_id AND TRACKER_ARTIFACT.revision = TRACKER_REV_ART.revision
         LEFT OUTER JOIN TEST_STEPS_FIELDS ON TEST_CASE_TRACKER.id = TEST_STEPS_FIELDS.parent_id
WHERE TEST_CASE_TRACKER.desc_id = 102
  AND TRACKER_ARTIFACT.deleted IN (0, 1)
  AND TEST_STEPS_FIELDS.reference_id IS NULL


The tracker_id and its project_id which has missing Test Steps table field can be retrieved by running the above queries.

In case a tracker cannot be found in the relevant project, the trash should also be checked.

Find the Project Admin of a Project

To find the project admin of a project, run the following query. Make sure to replace <PROJECT_IDS_TO_CHECK> with the project ids returned by the above query.

WITH PROJECT_ADMIN AS (SELECT id
                       from ACL_ROLE
                       WHERE NAME = 'Project Admin'),
     PROJECT_ADMIN_USER_IDS AS (SELECT DISTINCT MBR.to_id AS user_id, PRL.proj_id
                                FROM object PRL
                                         INNER JOIN object_reference MBR
                                                    ON MBR.from_type_id = 5 AND MBR.from_id = PRL.id AND MBR.field_id = 1 AND
                                                       MBR.to_type_id = 1
                                         INNER JOIN object PMA ON PMA.id = MBR.assoc_id AND PMA.type_id = 21
                                         INNER JOIN PROJECT_ADMIN ON PRL.REFERENCE_ID = PROJECT_ADMIN.id
                                WHERE PRL.proj_id IN (<PROJECT_IDS_TO_CHECK>)
                                  AND PRL.type_id = 19
                                  AND PRL.deleted = 0
                                  AND MBR.status_id = 3
                                  AND MBR.deleted = 0)
SELECT PROJECT_ADMIN_USER_IDS.proj_id, USER_TABLE.*
FROM PROJECT_ADMIN_USER_IDS
         INNER JOIN users USER_TABLE ON PROJECT_ADMIN_USER_IDS.user_id = USER_TABLE.id
ORDER BY PROJECT_ADMIN_USER_IDS.proj_id, USER_TABLE.id;




Restore the Name of Renamed Test Steps Fields

Recommendation on how to modify them before the upgrade:

  • Restoring the name of the renamed Test Steps field must be performed in the tracker ConfigurationField tab before (re-)trying the upgrade of codebeamer to the latest version.
  • If the "disableEditingBuiltInFieldsName" property is set to false in the Application Configuration, the table field can be modified by clicking on the name of the table field in the tracker's Configuration.


Before the codebeamer upgrade starts, a validation is performed that checks the same query. This means that the upgrade cannot start until the Test Steps table field is restored.

If the the Test Steps field is missing, for example, renamed or deleted, it is highly recommended to restore it through the Field section of the tracker configuration.

The default test steps table configuration is the following:

Example Test Steps table configuration

Test Steps table field is the crucial part for the test step reuse upgrade, but it is also highly recommended to use the default names of the other columns as well.

Guidelines for Fixing Invalid Transitive Test Step Reuses

Before codebeamer 22.10-LTS (GINA), making transitive test step reuses were possible through Excel import. From codebeamer 22.10-LTS (GINA) such reuses are not possible, however, previously-created transitive test step reuses can still exist in codebeamer.

Possible examples:

There are two test cases which have test step reuses between them.

Test Case 3 is referring three test steps from Test Case 2, which is not possible since those steps are already reused from Test Case 1.

In order to fix it, these steps from Test Case 3 must be deleted and reused from Test Case 1 manually.

Modifying items such as Test Case 3 is not be possible until the invalid reuses are fixed.


It is also possible that Test Case 2 looks like the following:


The Test Case 3 does not have error message, but the modification of Test Case 3 is also not permitted in this case until the transitive reuse is fixed.