Yes, and there are several ways to go about it.
First of all, it’s possible to simply copy and paste building blocks from one test case to another, but this can of course get quite cumbersome and you would have to maintain the same test logic in many different places.
A much better way of re-using building blocks and test logic between cases is to use “Custom Building Blocks”. Once created, you can modify and maintain the test logic in a Custom Building Block in one place. If the Custom Building Block is updated, all test cases using it will be automatically updated as well.
The easiest way of creating a Custom Building Block is to create the functionality in one test case and then do the following:
- Select the set of building blocks you want to turn into a “Custom Building Block” by dragging your mouse over one or more building blocks.
- Press Ctrl+H or “right click” on the building block selection and select from context menu “Create Custom Building Block”.
- The selected building blocks will be converted to a “Custom Building Block”. By double clicking you can open and edit it and save it once you are finished. Best practice is to give the “Custom Building Block” a meaningful name to make it easier to find and reuse the building block. Please notice that “Custom Building Block” opens in new tab for editing.
- You can find your “Custom Building Block” in the tab Building Blocks; Custom.
In order to reuse the “Custom Building Block” simply drag and drop it to other test cases, or add it as a new building block to an existing case by pressing CTRL+N on the test case canvas.
For getting a better insight you can watch a video tutorial here.
For any clarification, please contact our Priority Support.