Exercise 17.2 - Creating TM4J Artifact and Relation Types for Mapping

Objectives

Before a custom mapping between SysML and TM4J can be created, Syndeia must be configured to recognize the TM4J artifact and relation types to be used in the mapping. The new learning objective of this exercise is to create TM4J artifact and relation types in Syndeia.

Preparation

This exercise assumes the student has

  • Cameo System Modeler 18.0 - 19.0 (or MagicDraw with SysML plug-in) installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.4 installed as a plugin for Cameo/MagicDraw with a valid license for use

  • Syndeia JIRA interface, correctly installed with a valid license for user.

The user can. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes. We recommend that the student view the videos 1.6, 1.7, and 1.8 in the Introduction Section of the Syndeia training materials before attempting this exercise. These videos provide important background on creating custom mappings. Hands-on tutorials omit much of the logic behind the actions in the interest of clarity and brevity.
We will use the MagicDraw project Syndeia_JIRA_TM4J_Tutorial.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009) provided with the tutorials for this exercise, which loads the profile Syndeia_Mapping_Tutorials_Profile.mdzip. We also use the syndeia34Tutorial.mappings file provided, which has been installed in the .syndeia folder and renamed as syndeia.mappings.
For this exercise, you may use any JIRA repository you have available with the ability to create and edit TM4J elements of types Test Case, Test Cycle and Test Plan

Background – TM4J (Test Management for JIRA)

TM4J is a test management solution integrated into the JIRA user interface. The generic schema is shown in Figure 1.

  • A Test Case describes a specific test procedure.

  • A Test Cycle contains a set of Test Cases.

  • A Test Plan tracks the overall test program for a particular release or milestone. It contains one or more Test Cycles.

  • Any of these elements can be linked to a JIRA Issue.

    Figure 1 TM4J Schema

Exercise

  1. If not already open from the previous exercise, open the SysML project Syndeia_JIRA_TM4J_ Tutorial.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009) (or your own), right-click the top-level package, and launch the Syndeia dashboard. Go to the Mappings tab (Figure 2).

    Figure 2 Syndeia dashboard, Mappings tab

  2. Our objective is to create a new artifact type, TM4J Test Plan, and a new relation type, TM4J Test Plan -> TM4J Test Cycle, that could be used in creating a custom mapping.

  3. In the left column, right-click on Syndeia Mappings/1 Model Types/M. TM4J to open the Add TM4J Artifact Type window (Figure 3).

    Figure 3 Add TM4J Artifact Type window, initial

    1. Select a Repository from the pull-down list under TM4J Repository at the top.

    2. Click Get JIRA TM4J Types button. Select TM4J Test Plan, the TM4J artifact type you want to add to the Model Types list.

    3. Edit the name and description fileds, if desired.

    4. At this stage, you have two alternative paths in extracting the artifact attributes available for mapping.

      1. You may click the Retrieve TM4J Properties button. The resulting list in the table below may not show all the attributes associated with the artifact type (For TM4J Test Plan, it may not show any attributes at all).

      2. You can enter the name of an existing artifact of this type in the Template field before clicking the Retrieve TM4J Properties button. This sample artifact should have all the attributes that you wish to be able to map and these attributes should be populated

    5. In Figure 4, we have used the second option with a Test Plan artifact SYNDT-P8 in our repository as the template. By clicking Select All, we have chosen to make all attributes available for mapping, but we could have chosen a subset by checking or unchecking the boxes in the left column of the attributes table.

      Figure 4 The Add TM4J Artifact Type window completed

    6. Click OK to save the Artifact type.

  4. In the left column, right-clic on Syndeia Mappings/1 Model Types/M. TM4J to open the Add Relation Type window (Figure 5).

    Figure 5  Add Relation Type window

    1. Enter testRuns for Type. Note that this is the relation type in the schema in Figure 1 for the connection between a TM4J Test Plan and Test Cycles.

    2. Edit Name and Description fields as desired.

    3. Click OK and the Relation Type name should appear in the Model list.

  5. The names of the new artifact and relation types should appear under TM4J Model Types list in the left column (see Figure 6)

    Figure 6 Final Mappings tab in Syndeia dashboard, new artifact and relation types highlighted in red