Tags:
Test Management
Check Test Step Reuse at Codebeamer UpgradeTable of Contents
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 ConfigurationThe following section in the application configuration enables the renaming of table fields: "testManagement": { "disableEditingBuiltInFieldsName" : false }
This option must be set to true in the future to avoid issues with the Test Steps features. Database CheckBecause 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.04-SP5 Configuration ExportTo 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. There are three queries which need to be executed before continuing the upgrade. Process the query results in the following order:
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
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'), TEMPLATE_TRACKERS_WITH_TEST_STEPS as (SELECT TEST_CASE_TRACKER.id as tracker_id, TEST_STEPS_FIELDS.reference_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)) , CHILD_TRACKERS (tracker_id, proj_id, reference_id) as (SELECT child.id as tracker_id, child.proj_id, TEMPLATE_TRACKERS_WITH_TEST_STEPS.reference_id FROM task_type child INNER JOIN TEMPLATE_TRACKERS_WITH_TEST_STEPS ON TEMPLATE_TRACKERS_WITH_TEST_STEPS.tracker_id = child.template_id INNER JOIN object o on child.id = o.parent_id and TEMPLATE_TRACKERS_WITH_TEST_STEPS.reference_id = o.reference_id INNER join object_revision r on o.id = r.object_id and o.revision = r.revision UNION ALL SELECT child_x.id as tracker_id, child_x.proj_id, CHILD_TRACKERS.reference_id FROM task_type child_x INNER JOIN CHILD_TRACKERS ON child_x.template_id = CHILD_TRACKERS.tracker_id INNER JOIN object o on child_x.id = o.parent_id and CHILD_TRACKERS.reference_id = o.reference_id INNER join object_revision r on o.id = r.object_id and o.revision = r.revision) SELECT CHILD_TRACKERS.tracker_id, CHILD_TRACKERS.proj_id, CHILD_TRACKERS.reference_id, TEST_STEPS_FIELD_REV.name FROM CHILD_TRACKERS LEFT OUTER JOIN object TEST_STEPS_FIELD ON CHILD_TRACKERS.tracker_id = TEST_STEPS_FIELD.parent_id and CHILD_TRACKERS.reference_id = TEST_STEPS_FIELD.reference_id INNER JOIN object_revision TEST_STEPS_FIELD_REV on TEST_STEPS_FIELD.id = TEST_STEPS_FIELD_REV.object_id AND TEST_STEPS_FIELD.revision = TEST_STEPS_FIELD_REV.revision WHERE TEST_STEPS_FIELD_REV.name NOT IN ('Test Steps', '..');
PostgreSQL and MySQL version: WITH RECURSIVE 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'), TEMPLATE_TRACKERS_WITH_TEST_STEPS as (SELECT TEST_CASE_TRACKER.id as tracker_id, TEST_STEPS_FIELDS.reference_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)) , CHILD_TRACKERS as (SELECT child.id as tracker_id, child.proj_id, TEMPLATE_TRACKERS_WITH_TEST_STEPS.reference_id FROM task_type child INNER JOIN TEMPLATE_TRACKERS_WITH_TEST_STEPS ON TEMPLATE_TRACKERS_WITH_TEST_STEPS.tracker_id = child.template_id INNER JOIN object o on child.id = o.parent_id and TEMPLATE_TRACKERS_WITH_TEST_STEPS.reference_id = o.reference_id INNER join object_revision r on o.id = r.object_id and o.revision = r.revision UNION ALL SELECT child_x.id as tracker_id, child_x.proj_id, CHILD_TRACKERS.reference_id FROM task_type child_x INNER JOIN CHILD_TRACKERS ON child_x.template_id = CHILD_TRACKERS.tracker_id INNER JOIN object o on child_x.id = o.parent_id and CHILD_TRACKERS.reference_id = o.reference_id INNER join object_revision r on o.id = r.object_id and o.revision = r.revision) SELECT CHILD_TRACKERS.tracker_id, CHILD_TRACKERS.proj_id, CHILD_TRACKERS.reference_id, TEST_STEPS_FIELD_REV.name FROM CHILD_TRACKERS LEFT OUTER JOIN object TEST_STEPS_FIELD ON CHILD_TRACKERS.tracker_id = TEST_STEPS_FIELD.parent_id and CHILD_TRACKERS.reference_id = TEST_STEPS_FIELD.reference_id INNER JOIN object_revision TEST_STEPS_FIELD_REV on TEST_STEPS_FIELD.id = TEST_STEPS_FIELD_REV.object_id AND TEST_STEPS_FIELD.revision = TEST_STEPS_FIELD_REV.revision WHERE TEST_STEPS_FIELD_REV.name NOT IN ('Test Steps', '..');
3. Check Test Steps Field which are not Table Fields These fields must be renamed before upgrade.
select orev.name, tt.id as tracker_id, tt.proj_id as project_id, o.reference_id from object_revision orev inner join object o on orev.object_id = o.id and orev.revision = o.revision inner join task_type tt on o.parent_id = tt.id and tt.desc_id = 102 where o.reference_id < 1000000 and orev.name = 'Test Steps';
4. Check Working-Set Branches (only if you use working-set) WITH BRANCHES AS (SELECT BRANCH_ARTIFACT.id, BRANCH.proj_id, BRANCH_ARTIFACT_REVISON.name FROM object BRANCH_ARTIFACT INNER JOIN object_revision BRANCH_ARTIFACT_REVISON ON BRANCH_ARTIFACT.id = BRANCH_ARTIFACT_REVISON.object_id AND BRANCH_ARTIFACT.revision = BRANCH_ARTIFACT_REVISON.revision INNER JOIN task_type BRANCH on BRANCH_ARTIFACT.id = BRANCH.id WHERE BRANCH_ARTIFACT.type_id = 36 AND BRANCH.desc_id = 102) SELECT BRANCHES.* FROM BRANCHES WHERE BRANCHES.id NOT IN (SELECT BRANCHES.id FROM BRANCHES INNER JOIN object TEST_STEP_FIELD ON TEST_STEP_FIELD.parent_id = BRANCHES.id INNER JOIN object_revision TEST_STEP_FIELD_REVISION on TEST_STEP_FIELD.id = TEST_STEP_FIELD_REVISION.object_id AND TEST_STEP_FIELD.revision = TEST_STEP_FIELD_REVISION.revision WHERE TEST_STEP_FIELD_REVISION.name = 'Test Steps');
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 ProjectTo 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 FieldsRecommendation on how to modify them before starting 22.04 configuration export upgrade:
Before the Codebeamer configuration export 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:
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. Identify Test Step IDs Exceeding 255 Characters for Validation and Delete if NeededDue to the above mentioned "disableEditingBuiltInFieldsName" application configuration, using the test step Id column in the Test Steps table for different purposes was possible. It could mean that an Id can be longer than 255 character which is not permitted for the Test step reuse feature.
Possible solutions:
Guidelines for Fixing Invalid Transitive Test Step ReusesBefore 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. |
Fast Links
codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.