Reference Test Cases and Test Step reuse #792788/v2416 |
Tags:
not added yet
Table of Contents
Easier Maintenance of Tests using Reusable Test Cases and Test StepsReusable Test Cases and Test Steps is a tool to improve re-usability and maintainability of Test Management by reducing redundancy between Test Cases in projects. Often the Test scenarios require that some Test Cases and Test Steps contain repeated or similar actions performed during a Testing cycle. Just copying Test descriptions between Test Cases may result in lots of duplications and difficulty in maintenance when a wrong or outdated test-description appears several times in the Test Case hierarchy. To improve this situation in codeBeamer 7.8 we have introduced two new features:
Reusable Test CasesReusable Test Case is a tool to improve the re-usability and maintainability but reduce the redundancy between Test Cases in projects. A user is able to define as many Reusable Test Cases as they want. A new field is added to Test Cases called Reusable, which is used to be able to distinguish the Reusable Test Cases from normal Test Cases. When editing any Test Case the user can mark a Test Case as Reusable by setting the Reusable field to true. An example:
Finding and filtering for any "Reusable" Test Cases is easy by using a special filter option, which appears above the Test Case and Test Library trees when editing a Test Case. So to find only the "Reusable" Test Cases just click on the "Reusable only" checkbox (marked as #1 on screenshot). Once this filter is on the Test Case tree will show only the Reusable Test Cases. Additionally users can search and filter items by entering any text to the filter box above the tree, and this will further filter the Test Cases shown in the tree. Any Reusable Test Cases is indicated by the a down-arrow next to the Test Case's name (see mark #2 on screenshot below).
Adding Reusable Test Cases support to legacy TrackersIf you're upgrading from older codeBeamer versions (before 7.8) you can still add support of Reusable Test Cases to your existing Test Case Trackers. For that go and customize Test Case tracker(s) and add a new Boolean custom field named "Reusable".
Reusing Test StepsDefining a new Test Case with reusing Test StepsWhen editing a Test Case and defining its Test Steps users may want to reuse existing Test Steps defined as part other Test Cases. For that the Test Cases' editor's right side shows the Test Case tree and Test Case Library tree, where users can search and locate the Test Cases which contain the Test Steps they may want to reuse. When a user Drag-and-Drops one or more Test Steps from Reference Test Case on the right side into the Test Case the user is going to be asked about the following options:
The difference between the copy and reference mode is: Copy of Test StepsWhen using the Copy option the original and the copied Test Steps will have no relationship or connection between them, so if the original Test Step changes the copy will not change. Also the copied Test Step can be modified any time without restrictions, and such modification won't affect the original Test Step at all.Reference Test StepsWhen creating a Reference Test Step then the newly created Test Step will hold and maintain a reference to the original Test Step, which means that whenever the original Test Step changes the reference Test Step is automatically and immediately kept synchronized with the changes.This also means that the text ("Action", "Expected Result) inside Reference Test Step can not be modified, as that would make the reference logic invalid. Therefore the reference Test Steps will appear as read-only on the UI. However if the user needs they can break this strong reference relation, and turn a Reference Test Step to an simple copy later on by editing it. (See below...) Creating Reference or Copy Test Case using Drag-and-DropAs mentioned earlier the on the Test Case editor page users can drag-and-drop Test Steps from other Test Cases. Once dropped the user can choose if the system creates a Copy or a Reference of the original. This screenshot illustrates that:
Management of Reference Test StepsWhen doing a simple "Copy" of a Test Step is not very different from creating a new one and just typing in the text manually: there won't be any restriction later on how the Test Step behaves, and the "Action" and "Expected Result" will be always editable by the user. On the other hand an Reference Test Step behaves differently:
Navigating between the Reference and Referenced Test StepsTo identify the Reference Test Steps these will appear with a light yellow background color showing here. This can also be recognized by the up-right arrow icon. The link next to the icon shows the target/Referenced Test Case, and clicking on it will open a new window and scroll to the target Test Step (and highlights and focuses that Step too...). This makes it easy to jump to the target Test Step.
When user is viewing or editing a Test Case with Test Steps which are Referenced/Reused by other Test Steps then the UI will highlight those target Steps using light blue background color . The screenshot below shows that:
Such Reused/Referenced Test Cases will appear as:
As there might be multiple references into a Test Step there might be multiple links listed here. By clicking on each link the UI will open the downstream/Referring Test Case in a new window, hightlight and focus to the step which is referencing. So the links between the source/Reference and target/Reused Test Steps makes it easy to see where and how each Test Case is being reused or referenced. Tracing Test Step referencesThe TestCase "A".TestStep1->TestCase "B".TestStep reuse references are stored in an "derived" associaton between the TestCase "A" and "B" - thes association(s) are "automatically" maintained (added/removed/updated) by the TestCase editor when such a TestCase is changed. This is how such an association looks like:
You can "trace" these associations in the Traceability browser. All you need to do is to uncheck the "Do not show related items" checkbox. Like this:
Editing Reference Test StepsWhen working with Reference Test Steps the following rules apply: Editing Referring Test StepsThe Test Step which refers/reuses other Test Step (source side) can not be edited. This happens because such Test Steps are just live references of other Test Steps. The UI will show a warning and controls are always read-only. However if the user wants to modify this Test Step he can break the reference, and then the editing will be possible. The UI will show the "Break Reference" button for breaking the reference. After pressing that the Test Step will be editable and after save the reference-connection will be finally broken. While editing the Test Step the user can change his mind and reset/rebuild the original reference using the "Reset Reference" button. This only works until the first save.
Editing Referenced Test StepsWhen editing a Test Case with Referenced Test Steps these target Steps are editable, however the UI will warn the user about that these changes will affect other Test Cases too ! So when user starts to edit a reused Test Step this warning appears:
When user tries to save an Test Case with such modifications also a second warning appears:
When deleting a reused Test Step also a warning appears. Deleting reused Test Steps means:
Missing References and Error handling in Test RunnerWhile codeBeamer tries to maintain the references between the Referencing Test Steps it may happen that some of these references becoming are broken. This can happen if:
In both cases the Test Case editor and view pages will show a warning about this fact. This can be corrected by editing the Test Case or correcting the permissions. However if such error happens during a Test Run then the Test Runner UI will show an error message about this. Because such Test Case definition is considered invalid the Test Runner will automatically mark all Test Steps as blocked and will force a "blocked" outcome of the Test Case. This can be corrected after fixing the Test Case and by rerunning the broken Test Cases.
How the broken Test Cases appear in Test Runner: |
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, and help us 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. Your preferences will apply to this website only.
Note that user-behavior analytics are being captured on this server to improve the Codebeamer user experience.