Open Test Framework - Workflow Designer (OTX Designer)
- 1 Overview
- 2 Structure
- 3 Handling activities
- 4 Navigation and display of the sequence
- 5 Capturing and printing a sequence
The Workflow Designer (OTX Designer) is the central interface to insert and arrange OTX nodes of a test sequence. It helps the authors create, edit and understand the test sequences graphically. The OTX Designer is used for implementing the following main tasks:
The structure and features of the Workflow Designer are described in the following sections.
In the Workflow Designer, test sequences can be edited graphically, see the image below. The Designer may consist of one or many procedure tabs, each tab corresponds to a procedure (a workflow). Within a workflow, various activities (OTX nodes) are drawn together into a sequence on a white page. These activities can be configured through the dockable Properties window or the Properties dialog box (click here for more information). The activities are executed sequentially from top to bottom.
|Workflow Designer helps with editing OTX sequences graphically|
The sequences are presented in the form of a generic flowchart. This means that the author has only the ability to add individual items to, edit and adjust the presentation details. However, it has no direct influence on the position of the elements. It may include such activities so do not move the mouse to another location, such as in MS Visio. This supports the generic approach of OTX and has the following advantages:
- The representation is generated solely from the OTX data without further meta data
- The depiction of the sequence is independent of the flavor of the author
- The same OTX sequence is the same on different computers
- The author does not have to worry about layout details
A designer consists of the 3 following main parts (see the image above):
- The workflow (procedure) tab label
- The workflow (procedure) header
- The workflow (procedure) drawing section
Procedure Tab Label
The procedure tab label displays the name of the current procedure, it helps users manage many opened procedures. You can arrange the order of the opened procedures by dragging and dropping the tab labels to the desired position. If there are so many opened procedures, some procedures may be hidden. To display the hidden procedures, click on the forward (">>") icon in the right end of all the visible tab labels and select the procedure you want to display. You can move to the next procedure tab (i.e. the tab on the right of the current procedure) with the shortcut CTRL+TAB.
Each tab label has a context menu, right click on the tab label, a context menu will be displayed with the following entries:
|Close||Closes the current procedure.|
|Close all except this||Closes all opened procedure except the current procedure.|
|Open document folder||Opens the package folder containing the current document in a new window with the Windows Explorer.|
In the procedure header, the relevant information of the procedure are presented below:
- Parameter (In-, Out- and InOut- parameters)
- Implemented Signature
Procedure Drawing Section
Some elements in the Workflow Designer have the context menu which supports editing the element or adding variables or parameters for the procedure etc. Below are the brief descriptions of the context menu:
Right click on any where in the drawing section except the activites (nodes), it will display a context menu with the following entries:
|Show in SolutionExplorer||Finds and selects the procedure node of the current procedure in the Solution Explorer (expanding the parent item or scrolling the tree-view control, if necessary).|
|New Procedure In-Parameter...||Adds a new in-parameter to the current procedure.|
|New Procedure Out-Parameter...||Adds a new out-parameter to the current procedure.|
|New Procedure In/Out-Parameter...||Adds a new in/out-parameter to the current procedure.|
|New Local Variable ...||Adds a new local variable to the current procedure.|
Right click on an activity (or one activity of the selected activities, see below), it will display a context menu with the following entries:
|Cut||Cuts the activity or the selected activities.|
|Copy||Copies the activity or the selected activities.|
|Delete||Deletes the activity or the selected activities.|
|Paste||Pastes the copied or cut activity (or selected activities) below the current activity.|
|Add Comment||Adds a new comment and links the comment to the current activity.|
|Surround With >> Group||Creates a new Group activity to surround the current activity or the selected activities (i.e. the activities will be moved into the new Group activity).|
|Surround With >> Handler||Creates a new Handler activity to surround the current activity or the selected activities (i.e. the activities will be moved into the Try-branch of new Handler activity).|
|Surround With >> MutexGroup||Creates a new MutexGroup activity to surround the current activity or the selected activities (i.e. the activities will be moved into the new MutexGroup activity).|
|Extract Procedure||Extracts the activity or the selected activities into a new procedure and creates a new ProcedureCall to call the new procedure.|
|Disable/Enable||Disables/Enables the activity or the selected activities. Note that the disabled activities will not be executed and all the errors and warning related to these activities will not be displayed except the check rule Core-Chk011.|
|New Local Variable ...||Adds a new local variable to the current procedure.|
|Remove/Add Realisation||Removes/Adds realisation in the current activity. Note that you can only add realisation to some certain activities (EmptyBranch, EmptyParallel, EmptyHandler, Group, EmptyGroup, EmptyMutexGroup).|
|Toogle Breakpoint||Adds/Removes break point to/from the current activity.|
Right click on a floating comment, it will display a context menu with the following entries:
|Edit||Opens a dialog to edit the content of the comment.|
|Delete||Deletes the comment.|
|Delete link to (activity name)||Deletes the link between the comment and the activity (having the mentioned name).|
|Delete all links||Deletes all the links between the comment and other activities.|
Above are only the common and important menu entries. There are also some other menu entries in the context menu when you right-click on some compound nodes, or some sub-branches of some compound nodes, which can not be mentioned all here.
Adding new activities
To add an activity to the sequence, please follow the instructions below:
- Find the corresponding activity from the Toolbox.
- Drag the activity from the Toolbox into the sequence drawing section, note that there will be green plus signs displayed at the valid locations for this activity.
- Drop activity on one of the plus sign sothat the plus sign is replaced by the icon of the activity.
- If the insertion is not in the current visible area of the sequence, drag the activity onto one of the blue arrows at the edges of the Workflow Designer.
- The drawing section will be scrolled toward the corresponding direction to to show the hidden area, move the mouse pointer out of the blue arrow to stop scrolling (but still hold down the left-mouse button, i.e. still drag the activity).
- Drop the activity at the valid location (i.e. onto the green plus signs) sothat the activity is generated in the appropriate place.
- If you want to configure the activity, please use the Properties window or the Properties dialog box (click here for more information).
|Insert an Assignment activity from the Toolbox to the Workflow Designer using drag-and-drop|
Adding further realisations for existing activities
An activity of type Action Realisation may have more than one realisations, see OTX basic concepts. Please note that this section is only applied for the activities of type Action Realisation, the other types such as compound nodes and end nodes are excluded. Below is an example of adding further realisations for an activity:
- Drag an activity from the Toolbox into the sequence and drop it on a green plus sign (see "Adding new activities" above).
- Drag another activity from the Toolbox into the sequence and drop it on the existing activity to add further realisation.
- When you see the context menu displays, select the entry "Integrate" in the context menu to integrate the second activity with the first activity as the further realisation.
- To add another realisation to the activity with many realisations, drag a new activity onto the display area of the realisations in the middle of the activity, you can drop it at any desired position between the existing realisations.
- There will be no context menu, the new activity will be automtically inserted a further realisation in the activity.
- If you want to configure a realisation, click on the corresponding realisation icon among the realisations and use the Properties window or the Properties dialog box.
Besides using a new activity to add further realisation, you can also use an existing activity to add further realisation by drag-and-drop. Note that you must drag and drop an activity with one realisation onto the other activity.
You can replace an existing activity with another activity. If the existing activity has a specification, the new activity will inherit the same specification. To replace an activity, please proceed as follows:
- Drag an activity from the Toolbox into the sequence and drop it on an existing activity in the workflow.
- When the context menu appears, select the entry "Replace" and the existing activity will be replaced with the new activity.
Besides using a new activity to replace an existing activity, you can also use an existing activity to replace another activity by drag-and-drop.
Editing a sequence
In the Workflow Designer, one or more activities (nodes) can be copied, cut, pasted , or deleted, please proceed as follows:
- Select an activity in the sequence, or select many activities by holding the CTRL key down and clicking on the all activities you want to select. You can also hold the SHIFT key and use mouse to drag a retangle to select all the covered activities.
- To deselect some of the selected activities, hold down CTRL key and click on each activity you want to deselect.
- There are many ways to copy, cut, delete or paste the selected activities:
3.1 Use the keyboard shortcuts (CTRL+C: Copy, CTRL+X: Cut, DEL: Delete, CTRL+V: Paste) with the selected activities, note that you can paste on an activity or on an empty flow (where green pluses appear). 3.2 Use the context menu by right-clicking on one of the selected activities (or on an empty flow to paste) and selecting the corresponding entry (see above). 3.3 Use the corresponding command buttons in the tab "Start" of the Ribbon. 3.4 To copy and paste the selected activities by drag-and-drop: click and hold the mouse on one of the selected activities and drag them to the position you want to copy and paste (do not release the mouse), then hold down the CTRL key and release the mouse at the position (i.e. drop the activities at the position while holding the CTRL key).
- To move the selected activities, click and hold the mouse on one of the selected activities and drag them onto the new position (it must be a valid location i.e. where the green pluses appear) and release the mouse.
Within a sequence, you can move the view of the sequence up/down or left/right by using the mouse wheel, the arrow keys or the scroll bars. You can also use the Overview tool window to navigate the visible display area in case your workflow is large (click here for more information). In this tool window, you can drag the rectangle outline across the overview picture to move the current view to the expected position.
To zoom in and out of a sequence, you can hold down the CTRL key and use the mouse wheel, or use only the mouse wheel with the Overview tool window, or you can use the slider in the Status Bar, see the image below. Note, you can only change the zoom level from 10% to 400%. Beside the slider, you can find the "Reset zoom factor" button to set the designer appearance back to the default zoom (i.e. 100%), or the "Fit to window" button to reduce the zoom sothat the entire sequence may be displayed, note that the minimum zoom percentage is 10%. You can also find the "Reset zoom factor" and the "Fit to window" commands in the "Display" tab of the Ribbon.
Besides zooming the sequence, you can enlarge the sequence display area by using the "Maximum work area" button which allows for setting all the opened tool windows to auto hide and minimizes the Ribbon. If you want all the auto hide tool windows to be docked back, you can use the "Standard layout" command which allows for docking all the tool windows. You can find these two commands in the Status Bar (see the image below) or in the "Display" tab of the Ribbon.
|Zooming within the workflow designer|
Adjusting the display of the sequence
The OTF allows for adjusting the display of the sequence such as the detail level, the display quality, or the max width of the activities etc. To adjust the display of the sequence, you can find the corresponding buttons in the "Display" tab of the Ribbon.
In the "Designer Appearance" section of the "Display" tab, there are 6 detail levels for the presentation of the activities as shown below:
|1 - All||Shows all available information within an activity.|
|2 - Standard||Shows all available information except the specification within an activity.|
|3 - Compressed||Shows only the name and generated text of the function of an activity.|
|4 - Test Step||Shows only the name, the "ValidFor" property and the specification of an activity, and sets the Test Step mode active.|
|5 - Code||Shows the specification and the generated text of the function of an activity in pseudo code style.|
|6 - Specification||Shows only the name and the specification of an activity.|
Here in the "Display" tab, you can also set the the max width of the activities in the sequence by selecting the size in the "Max Width" combo-box. If you check the option "Fixed Width" all the activities will be displayed exactly according to the selected max width; otherwise, only the activities with the display content longer than the max width will be limited by the max width.
Besides, you can use the button "Quality of Display" in the "Display" tab to set the display quality to High or to Low. The low display quality will turn off the softening and shadow effects, which is suitable in case that you want to see the text clearer or your computer performs slow with the softening and shadow effects. You can also find this button in the status bar at the bottom of the OTF (see the image above).
Finally, you can show or hide all the floating comments in the sequence by using the command "Display Comments". You can also find this command in the Status Bar at the bottom of the OTF (see the image above).
Capturing and printing a sequence
Capturing a sequence
You can capture the image of the current sequence by using the button "Copy as Bitmap" in the "Start" tab of the Ribbon. The captured image of the sequence has the same appearance as it is presented in the OTF (see the previous section for the sequence display adjustment). Please note that only the appearance is the same, the zoom of the captured image is always 100%. The image will be copied to clipboard, you can then paste the image in another application such as MS Word etc.
Printing a sequence
You can also print a sequence. Please proceed as follows:
- Set the detail level of sequence as you desires. The sequence will be printed as it is presented (see the previous section for the sequence display adjustment).
- Press CTRL+P. It will open the "File" menu in the Ribbon, and go to the "Print" tab.
- With the "Page Setup ..." button, you can set the properties of the page and select a printer.
- Click on the "Print ..." button to print the sequence.
|Printing a test sequence with page preview|