===== Edit a diagram ===== This option of the TAST tool allows ** create / modify a diagram.** Below, **the screen to edit a diagram**: {{ :edit_diagram.png?nolink |}} This screen allows: * Increase the size of the elements of the diagram, using the 'magnifying glass +' icon. * Decrease the size of the elements of the diagram, with the 'magnifying glass -' icon. * Delete the diagram that we have selected using the bin icon. * Download an image of the diagram on the screen with the download icon. * Validate the mappings included in the diagram using the 'validate mapping icon'. * Execute the validation of the diagram with the play icon. * Select the elements to be included in the diagram through the + icon:\\ * //Pointer// (complete information of the selected element) * //Object// * //Message// * //Reply message // * //Gates// * //Bifurcations// * //Loops//. ==== Checks in message properties tab.==== In a message, by double click over it, is possible to indicate the type of action when the step is executed based on the following checkbox. {{:en:checks_in_message_properties_tab..png?800|}} - **Locking step:** if this message fails, the test execution will stop and the test will end.\\ - **Optional step:** the result of this step will not impact the test result.\\ - **Comment out:** if this check is marked, the message will not be executed. ==== Guards ==== A guard is a logical condition that can be included in a UML message. The behavior is as follow, when the logical condition is true, the message is executed, when the logical condition is false, the message is NOT executed. A guard is really useful when an action must or must not be executed based on the result of a condition. {{:en:edit_diagram:guards_example.png?800|}} The conditions inside a guard can be of two types: * **Simple**, by using logical operators like, < (less than), > (greater than), == (equal to), != (different than), <= (less or equal to), >= (greater or equal to). * **Complex**, by concatenating the use of simple operators through logical operators as: AND (and), OR (or), && (exclusive and), || (exclusive or) Following some examples about simple and complex conditions in a Guard: * **#numCol < 25**\\ The message will be executed when, the variable numCol is less than 25. * **#myFavoriteApp == “TAST”**\\ The message will be executed when the variable myFavoriteApp is equal to the string “TAST”. To be considered that the strings must be compared using “” (double coutes). * **#fahrzeugtypTestData =="Gebrauchtwagen"||#fahrzeugtypTestData=="Vorführwagen" || #fahrzeugtypTestData=="Tageszulassung"**\\ The message will be executed when the variable fahrzeugtypTestData, is equal to one of the following values: Gebrauchtwagen, Vorführwagen, Tageszulassung. * **#str1 =="TAST" AND #str2=="TaaS" AND #str3=="SIPSA"**\\ The message will be executed when the variable string str1 is equal to TAST and when the variable str2 is equal to TaaS and when the variable str3 is equal to SIPSA. ==== Multiple line text ==== In the mapping of a message, is possible to include a value with line skipping. For this, there is a checkbox 'Multiline Text': {{:Multiple_line_text.png?nolink&1600|}} If the checkbox is selected, an editor will appear to include the text: {{:Multiple_line_text_1.png?nolink&1600|}} {{:Multiple_line_text_2.png?nolink&1600|}} ==== Reply message ==== This message has to be tied to another message between two objects and is painted in the opposite direction. The two messages form a set and are not treated separately. {{:Reply message_1.png?nolink&500|}} \\ * The only function allowed in the reply message is //assertion//, that has as input parameters //stepResult// (result of the previous message), and can have more parameters. The output parameter is also //stepResult//. * This message allows us is to vary the result of the previous step by checking some conditions. This process is done using a javascript. {{:Reply message_4_def.png?nolink&500|}} DATA MANAGEMENT: It allows modifying the javascript of each one of the diagrams. {{:Reply message DM.png?nolink&700|}} ==== Gates ==== This option of the TAST tool allows the user to pass information between sequence diagrams. Gates can be an easy way to model the passing of information between a sequence diagram and its context. A gate is merely a message that is illustrated with one end connected to the sequence diagram's frame's edge and the other end connected to a lifeline and represents another diagram. About Gates, please consider the following important topics: * The **position of the adaptor inside the gate is very important for the correct behavior** because the Gate is also related to the Adaptor you plan to instantiate. Thus, you should put the Gate not only in the number step, but also in the same lifeline where you can continue the test execution. For example, if you want to use a Gate to a HTML GUI Adaptor, you should put the Gate in a Lifeline of a GUI HTML Adaptor into the parent diagram. * The **Isolated** behavior always instantiates all adaptors. * The **Non-isolated** behavior: maps the messages of the first adaptor of the gate that has the same type as the adaptor of the parent where it is drawn; the rest of the adaptors will be instantiated. * The **concept of Isolated / Non-Isolated** is internally configured in TAST. Currently, that concept **only applies for these adaptors**: **GUI Adaptor** and **Web Services Adaptor**. * For the User's Gates: all the Gates in lifelines belonging to User objects are mapping to the User object of the Father diagram. How to Create a Gate: In the toolbar, select the gate and draw on the lifeline. Double click and open the gate properties, where you choose the domain, the project and the diagram you want to copy. {{:Gate propertiespng.png?nolink&700|}} The selected diagram can be visualized by clicking on the icon of the image. {{:Gate propertiespng image 2.png?nolink&700|}} By clicking on the message map, it is displayed. {{:Mapeo del gate .png?nolink&700|}} DATA MANAGEMENT: Allows to assign test case data to each gate included in the diagrams. {{:Data management gate.png?nolink&700|}} EXECUTION OF TEST SET WITH GATES: A Test Set containing gates is created and executed. {{:Ejecución de TS con Gate.png?nolink&700|}} ==== Combined Fragments ==== This option of the TAST tool allows the user to handle //bifurcations// and //loops//. TAST allows the following types of combined fragment: * To handle bifurcations: * **CF ALT**: if the condition indicated in the Guard of the Combined Fragment is true, the steps of the first part of the ALT will be executed; otherwise, the steps executed will be those of the 'else' part: {{:CF_Alt_eng_1.png?nolink&1100|}} {{:CF_Alt_eng_2.png?nolink&500|}} * To handle loops: * **CF Loop do while**: while the condition indicated in the Guard of the Combined Fragment is true, the steps of the Combined Fragment will be executed. The condition is check after the steps are executed, so //do while loop// guarantees the loop execution at least once: {{:CF_Do_While_eng_1.png?nolink&1100|}} {{:CF_Do_While_eng_2.png?nolink&500|}} * **CF Loop while**: this loop is similar to //do while looop//. The difference is when the exit condition of the cycle is evaluated. In the //while loop// this evaluation is done before entering the cycle, which means that the loop may not get executed: {{:CF_while_eng_1.png?nolink&1100|}} {{:CF_while_eng_2.png?nolink&600|}} * **CF Loop for**: All the steps included in this loop will be executed a number of times, according to the parameters indicated in the fragment properties tab: * //Guard:// this field indicates the condition that the specified variable must meet to execute the steps of the For loop. This variable will appear in the section 'Variable for iteration' * //Case start:// contains the initial value that the variable will take for the iteration inside the loop * //Type increment:// type of increment of the variable. It can be incremental (+) or decremental (-). {{:CF_for_eng_1.png?nolink&1600|}} {{:CF_for_eng_2.png?nolink&300|}} * **CF Loop for each**: It enables to iterate one by one (from 1 ... n) the selected row or column of a table introduced as variable. It makes possible to handle one by one the information selected in a Vertical or Horizontal way. {{:CF_for each_eng_1.png?nolink&1700|}} {{:CF_for each_eng_2.png?nolink&700|}} To get data from the Object, use the method VariableName[n], where [n] is the index of the Object´s row or column, depending on the type of iteration indicated in 'Iteration type': {{:CF_for each_eng_3.png?nolink&1200|}} ==== Delete a message ==== When you want to delete a message from a diagram, the following window appears: {{:delete_message_eng.png?nolink&3000|}} * //No//: the message is not deleted. The delete confirmation window is closed. * //Delete message and variables//: the message and the references of the variables declared by that message are deleted. The delete confirmation window is closed. * //Delete only the message//: only the message is deleted, remaining the references of the variables declared by that message. The delete confirmation window is closed.