Exercise 15.1 - SysML TestRail Reference Connection.

Objectives

The new learning objectives of this exercise are to create reference and model transform connections between a SysML element and a TestRail element.

Preparation

This exercise assumes the student has

  • IBM Rational Rhapsody 8.2 installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.3 installed as a plugin for Rhapsody with a valid license for use

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

The user can use any TestRail repository they have available with the ability to create and edit elements within a TestRail project. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes.
We will use the provided Rhapsody project Syndeia_TestRail_Mapping_Tutorial.zip. For this demonstration, we use the Sandbox project which contains an existing set of Test Cases, Test Suite, Test Runs and Milestones, but you may use any existing elements in your TestRail repository, instead. Caution: Rhapsody has, by default, restrictions on the naming of SysML elements, which can create problems when Syndeia tries to create Rhapsody model elements that violate these restriction, e.g. beginning a SysML block name with a number. We recommend modifying any Rhapsody models you create to relax these restrictions. Modify the properties of the top-level package of the model under General::Model::NamesRegExp with the following string and save.
^(([a-zA-Z0-9_][a-zA-Z0-9_ ():-]*)|(operator.+))$

Background – TestRail

TestRail is a test management solution from Gurock Software GMBH. The generic schema as supported by Syndeia is shown in Figure 1.

  • All elements are contained within a Project.

  • A Suite is composed of zero-to-many Sections.

  • A Section is composed of zero-to-many Cases.

  • A Milestone is composed of zero-to-many Test Runs.

  • A Test Run is composed of zero-to-many Tests and references a specific Test Suite.

  • A Test holds a specific test result and references a specific Case.

    Figure 1 TestRail Schema

Exercise

  1. Open the SysML project Syndeia_TestRail_Tutorial.rpy (or your own), right-click the TestRail Tutorial Test package, and launch the Syndeia dashboard (Figure 2).Select a project in Syndeia Cloud if necessary.

    Figure 2 Launching Syndeia dashboard

     

  2. To connect to a TestRail repository, right-click the TestRail category under Repositories in the Repository Manager tab and select Add… (Figure 3), then enter a name, your own TestRail URL and credentials, and click OK (Figure 4).

    Figure 3 Adding a TestRail network connection


    Figure 4 Entering TestRail repository info

     

  3. Your repository should load and expand to show Test Suites, Test Runs, and Milestones, as in Figure 5.

    Figure 5 Viewing TestRail repository contents in Repository Manager tab

     

  4. To create a reference connection between a SysML element and a TestRail Case, go to the Connection Manager tab on the Syndeia dashboard, as in Figure 6.

    1. Expand the SysML model in the left pane to show the Test Case 01 block.

    2. Select Reference under Connection Type in the middle pane.

    3. Expand the Issues folder in the right pane to show the Test Case to be connected, for example, New Test1Case.

    4. Drag and drop Test Case 01 from the left pane on top of an issue in the right pane to connect them (or vice versa) and confirm.

      Figure 6  Syndeia Dashboard, Connection Manager tab

  5. To see the reference connections that have been created, go to the Connection Search tab on the Syndeia dashboard and click the Get All button (see Figure 7)

    Figure 7 Syndeia Dashboard, Connection Search tab

  6. The reference connection can be used in a number of ways by Syndeia. Close the Syndeia dashboard. To open a TestRail element directly from Rhapsody, right-click on Test Case 01 in the containment browser and select Syndeia → Open Connected Artifacts.. The TestRail element New TestCase will be opened in the default web browser (see Figure 8). Note: your TestRail user interface may appear different depending on your configuration settings.

    Figure 8  TestRail web interface

  7. The reference connection may also be used to detect changes across the connection. To demonstrate,

    1. Make a change in New Test Case in the TestRail web interface, e.g. set Priority to High, and save the change

    2. Reopen the Syndeia dashboard. Go to the Connection Browser, load the SysML Repository, expand to find the connection to Test Case 01, right-click and select Compare Source & Target (Figure 9).

      Figure 9  Syndeia Connection Browser, comparison across new connection

    3. The Comparison Result tab (Figure 10) shows a newer version of the TestRail element is available. The reference connection can be updated by right-clicking on the red row and selecting either Sync Source -> Target or Sync Target -> Source.

      Figure 10  Syndeia Comparison Results tab showing a newer version of the TestRail element available