UML & SysML modelling languages

Expertise and blog articles on UML, SysML, and Enterprise Architect modelling tool

version francaiseTwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn
Wednesday, 24 January 2018 08:17

eaUtils 1.14 : breadcrumb trail and sorting enhancements, add-in automated tests

Written by

eautils 1.14 addin pour sparx enterprise architect

Following the release of a portable version last November, eaUtils 1.14 free utilities add-in for Sparx Enterprise Architect has just been published:

  • Limited until now to composite elements, eaUtils breadcrumb trail navigation feature has been extended to support hyperlinks, packages (opening the first diagram in the package), and navigation cells (available since EA13).
  • eaUtils elements sorting has been enhanced with new options:
    • Order elements by object id, matching the order in which they've been created or imported in EA.
    • Upon a user request, sort sub-elements e.g. to process actions within an activity.

The increasing complexity of eaUtils requires a minimum level of testing before releasing a new build in order to reduce the risk of new or regression bugs. Introduced for the first time at the EA User Group London 2017, eaTests ( automated testing solution for EA add-ins is integrated with eaUtils to maintain and run automated tests. The latest 1.14 updates have been included in the automated tests as discussed later in this article.

Note: eaTests is currently maintained for the sole use of eaUtils. Designed to work with other add-ins, as illustrated at the EAUG 2017 via hoTools Open Source EA add-in, please feel free to contact me on guillaume [at] for more information on integrating your add-in with eaTests.

This article illustrates eaUtils 1.14 new features and the automated testing process run for this new version, before publishing it.

eaUtils 1.14 features

Generate links back to the calling diagram(s) with the improved Breadcrumb Trail navigation

The following diagram illustrates the different types of links that one can use in Sparx Enterprise Architect to open a diagram:

eaUtils 1.14 breacrumb main diagram

Composite elements support

In the "Activity3" composite element's activity diagram, eaUtils makes it possible to generate a link to go back to the above diagram ("main").

Running eaUtils generate diagram breadcrumb trail from the composite activity diagram opens the popup below.

eaUtils 1.14 breacrumb composite elements

Upon completion, two hyperlinks have been created according to the calling diagrams in the model, as shown hereafter (Back to Main... to Activities...):

eaUtils 1.14 breacrumb composite elements result

The resulting completed navigation is illustrated below:

eaUtils 1.14 breacrumb composite elements liens de retour navigation fil d'Ariane

Package support

eaUtils breadcrumb trail feature can be run from the package's main diagram to generate a link back to the calling diagrams. In the example below, the Package option must be enabled.

eaUtils 1.14 breadcrumb packages


eaUtils 1.14 breacrumb packages sparx enterprise architect navigation link

Hyperlinks support

eaUtils breadcrumb trail "hyperlinks" option must be enabled to generate a link back from Activity2's diagram to the "main" and "activities" diagrams.

eaUtils 1.14 breadcrumb hyperlinks sparx ea

Navigation cell support

The last available option illustrates the "Activities" diagram that is opened via a Navigation Cell link from the diagram "main".

  • eaUtils 1.14 breacrumb navigation cells sparx ea

Model elements sorting in EA

Sort elements by their creation order (Object ID option)

Ordering model elements in your EA repository can be very useful to help with the management of a great amount of requirements, use cases, classes, blocks, interfaces, components, etc. To cater for this need, eaUtils provides an array of settings to order by name, alias, stereotype or tagged values.

I recently worked on a model which content had been generated via a reverse engineering on the source code files. With EA applying the alphabetical order by default, there was a need to list the classes by their created order. To avoid having to write a dedicated script to achieve such result, I carried a small improvement in eaUtils by implementing "object id" as a new sorting option (note: Object ID matches the order elements are created in EA).

In the following example, classes have been created in the order matching their suffix value (e.g. -1, -2, -3, etc.). eaUtils has been opened with the Object ID option.

eaUtils 1.14 sort tri element object id sparx ea


eaUtils 1.14 sort tri element object id sparx ea result

eaUtils can also run the sorting on a tree branch of packages and sub packages via the "process tree package" option. In the example below, Test1, Test2, Test3 and Test4 packages contain the same classes.

eaUtils 1.14 sort tri element object id sparx ea tree package


eaUtils 1.14 sort tri element object id sparx ea result tree package

Sub-elements ordering support

The following ArchiMate diagram illustrates a specific case provided by an eaUtils user:

  • The business processes' alias field value match their executing order (e.g. BP-1, BP-2…).
  • BP-2 process includes subprocesses, located under that element.
  • All the process elements within this model need to be ordered by alias.

eaUtils 1.14 sort tri element alias sparx ea sous elements archimate

eaUtils provides a new sort sub elements option to extend the sorting to the sub-processes (BP2-1, BP2-2…).

Result (alias values added):

eaUtils 1.14 sort tri element alias sparx ea sous elements archimate result

eaUtils 1.14 Enterprise Architect add-in automated tests with eaTests

eaUtils is integrated with eaTests. This solution enables me to define, maintain and run test cases on eaUtils within dedicated EA projects running the following structure.

  • Data Set: model samples on which eaUtils features will be run through the automated tests.
  • Test Steps.
  • Test Runs: history log of tests runs, including results (successful or failed).

eaUtils 1.14 automated tests addin enterprise architect sparx model

The following steps and data sets have been added to cater for eaUtils 1.14 enhancements:

eaUtils 1.14 automated tests addin enterprise architect sparx model

To generate the definition of a new step, eaUtils must be configured and executed first. The following illustrates a test on the sub elements sorting (step 12):

  • Pre-condition: eaTests must be enabled (eaUtils developper mode).

eaUtils 1.14 automated tests addin enterprise architect

  • A "trace" stereotyped dependency between the testcase element and the data set package is defined.

eaUtils 1.14 automated tests addin enterprise architect step

  • The sub elements option is enabled in eaUtils settings.

eaUtils 1.14 automated tests addin enterprise architect settings

  • eaUtils sort elements is run against the data set package.

eaUtils 1.14 automated tests addin enterprise architect generate

  • The resulting order is checked against the expected post conditions:

eaUtils 1.14 automated tests addin enterprise architect sort postconditions

  • The testing step's XML definition is generated in EA System Output view:

eaUtils 1.14 automated tests addin enterprise architect output

These details are copied into the XML file used by eaTests automated tests for eaUtils add-in. It contains for each step the settings, the method to call including its parameters, the target package, the postconditions to check, etc.

eaUtils 1.14 automated tests addin enterprise architect xml content

To run automated tests :

  • Open the extend ribbon, eaUtils menu, eaUtils Run Tests.

eaUtils 1.14 automated tests addin run eatests

  • eaTests starts a new test run.
    • The XML file content (tests definition) is read and loaded in memory.
    • For each step:
      • eaUtils settings are updated.
      • The add-in method is run on the associated data set package.
      • Results in the model are compared with the post conditions.
      • Details are generated within a sequence diagram.
  • The project browser contains a new test run package with a sequence diagram for each step, and a summary is displayed via an eaTests popup window.

eaUtils 1.14 automated tests addin eatests successful

  • The following sequence diagram illustrates step 12 test run:

eaUtils 1.14 automated tests addin eatests results sequence diagram

eaUtils 1.14 is available to download from