Download

Installation files

Download the following UML Checker installation files to a folder of your choice:

  • testgenerator.dll (the UML Checker plug-in for Enterprise Architect)
  • Interop.Ea.dll (an Enterprise Architect library required for integration)
  • traceutils.jar (the UML Checker runtime library)
  • SBT_ATM.zip (a zip file containing the Java files and Enterprise Architect ATM.eap model of the ATM example)

Pre-requisites

You need the following software installed in a computer or virtual machine with the Windows operating system:

Configuring environment variables

The environment variable PATH should contain the following folders:

  • the ‘bin’ folder of the intalled JDK (e.g., C:\Program Files\Java\jdk1.7.0_11\bin)
  • the ‘bin’ folder of the installed AspectJ (e..g,, C:\aspectj1.8\bin)

Installing the add-in for Enterprise Architect

  1. Register the “TestGenerator.dll” assembly with the Microsoft .Net Assembly Registry Utility (“RegAsm.exe”), by executing the following command in a command prompt:
    <path of RegAsm.exe executable>  <path of TestGenerator.dll file>  /codebase
  2. Launch the Windows Registry Editor (regedit.exe), and create a new entry under “HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins”, with key “TestGenerator” and data value “TestGenerator.TestGenerator”.
  3. LaunchEnterprise Architect, and execute the option “Manage Add-Ins …” under the “Add-Ins” menu. The TestGenerator add-in should appear in the listing. Check the “Load on Startup” option and save changes.
  4. Restart Enterprise Architect. At this time, the “Test Generator” option should appear in the “Add-Ins” menu, both on the top menubar as well as on the context sensitive pop-up menu (accessible with the right mouse button over any location in the “Project Browser” or the diagram editor).
  5. Open the “Preferences” option of the “Test Generator” add-in and fill in the requested paths in the “General Preferences” that will apply to all projects. Examples are shown below:
    C:\eclipse-java-kepler-SR2-win32-x86_64\eclipse\plugins\org.junit_4.11.0.v201303080030\junit.jar
    C:\aspectj1.8\lib\aspectjrt.jar
    D:\Eclipse\SBT_TraceUtils\traceutils.jar
    C:\eclipse-java-kepler-SR2-win32-x86_64\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar
    C:\aspectj1.8\lib\aspectjweaver.jar

For further instructions and installation screenshots see Annex A in  MSc thesis (in portuguese).

Running the sample ATM project

  1. Download and unzip the SBT_ATM.zip  file
  2. Open the ATM.eap file with Enterprise Architect. The model should have a “Dynamic View”, with two sequence diagrams, and a “Logical View”.
  3. Click the right mouse button over the ATMTest folder in the “Dynamic View” and select Add-in->Test Generator->Preferences.
  4. Fill in the “Current Project Preferences”, the Aspect weaving mode (Compile time weaving) and the location of the Java source code for this project (…\SBT_ATM\src), and save changes
  5. Click the right mouse button over the ATMTest folder in the “Dynamic View” and select Add-in->Test Generator->Generate and Execute Tests Checking Coverage. After waiting a few seconds, you should get two dialog messages with the test results and the execution time.
  6. Check the test results and coverge information in the sequence diagram inside the ATMTest folder.

Experimenting with the ATM project within Eclipse

  1. In Eclipse, create an AspectJ project named ATM (or with a name of your choice)
  2. Import (drag and drop) the Java source files of the ATM sample to the newly created project
  3. Add the junit.jar libray for JUnit3 to the ‘Java Build Path’ of the ATM project (Add Libraries -> JUnit -> JUnit Library Version=JUnit 3)
  4. Add the traceutils.jar file to the ‘Java Build Path’ of the ATM project (Add External Archives …)
  5. For compile time weaving, add the traceutils.jar file to the Aspect Path of in the ATM project (Properties -> AspectJ Build -> Aspect Path -> Add External JARs …)
  6. Build the project
  7. Run src/atmtest/ATMTest.java as a JUnit Test. In the JUnit viewer you should get one test passed (testATM_1) and one test failed (testATM_0), with a message like:
    junit.framework.ComparisonFailure: |DiagramMessageID=10| expected:<[INSUF_BALANCE]> but was:<[FAIL]>.
Share