...
If not already open from the previous exercise, open the SysML project Syndeia_JIRA_TM4J_Mapping_Tutorial.rpy (or your own) (Get it here -SysML Models, Profiles and Mappings.), right-click the top-level package, and launch the Syndeia dashboard. Go to the Mappings tab (Figure 2).
Figure 2 Syndeia dashboard, Mappings tab
Our first objective is to create a new SysML-TM4J mapping, Block (Test Plan) - TM4J Test Plan. In the left column, right-click on Syndeia Mappings/2 Mapping Groups/[↔] SysML - TM4J and select Add Mapping (Figure 3).
Figure 3 Mappings window
Choose Source Artifact Type as Block (Test Plan) from the pull-down menu.
Choose Target Artifact Type as TM4J Test Plan from the pull-down menu.
Enter Name and Description as shown in Figure 4.
Choose Structure Level as Children Immediate from the pull-down menu.
Choose Include Attributes as Include Attributes from the pull-down menu.
The window should appear as in Figure 4 at this stage.
Figure 4 New Mappings window, top half
Scroll down to see the bottom half of the Mappings window, as in Figure 5.
Click Retrieve Available Attribute Definitions below the Attribute Definition Mappings table. Using the Plus button, add the Three attribute mappings line-by-line for the Test Plan artifacts as shown in Figure 5.
Figure 5 New Mappings window, bottom half
Choose Include Relations as Include Relations from the pull-down menu.
Using the plus button below the Relation Type Mappings table, add the two relationship mappings line-by-line as shown in Figure 5.
Using the plus button below the Related Mappings table, add the two related mappings line-by-line as shown in Figure 5.
Click Save Mapping at the bottom before moving on.
Execute the model transform just created by dragging J4::My Test Plan onto a project in JIRA with the capability to accept TM4J model elements (see Figure 6). Choose the mapping just created, Block (Test Plan) – TM4J Test Plan.
Figure 6 Connection Manager tab in Syndeia dashboard, drag My Test Plan to JIRA project
Expand the JIRA column and find the new Test Plan element, My Test Plan. Right-click My Test Plan and open JIRA. My Test Plan in the JIRA web browser should look similar to Figure 7.
Figure 7 My Test Plan in JIRA web browser, showing related Issues and Test Cycles after model transform
From the Syndeia dashboard, Connection Browser or Connection Search tab, execute Compare Source and Target on the connection from My Test Plan. The results should appear the same as Figure 8. Note the relationships on both sides connecting My Test Plan to My Test Cycle and My Test Project.
Figure 8 Comparison Results across My Test Plan Connection
In the SysML model, modify the connections to My Test Plan, as shown in Figure 9.
Figure 9 Modified SysML model
Delete the dependency relationship from My Test Plan to My Test Project.
Add a second part property using the block My Second Test Cycle.
Run Compare Source and Target again from the My Test Plan connection. The results should now appear similar to Figure 10. The part property relationship to My Second Test Cycle has no equivalent on the JIRA side and the connection to My Test Project has disappeared on the SysML side.
Figure 10 Comparison Results across My Test Plan Connection after modifying SysML model
From the Syndeia dashboard, Connection Browser or Connection Search tab, execute Sync Source to Target on the connection from My Test Plan, then repeat the Compare Source and Target. The results should resolve the differences shown in Figure 10.