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)
You need the following software installed in a computer or virtual machine with the Windows operating system:
- Java Development Kit (JDK) (tested with version 1.7.0)
- Enterprise Architect (tested for version 7.5, but should run with more recent versions)
- Eclipse IDE for Java Developers (tested with Kepler version)
- AspectJ (standalone bundle with AspectJ compiler, weaver, and runtime) (tested with version 1.8)
- AspectJ Development Tools (AJDT) (for Eclipse integration) (tested with version 2.2.3)
- Microsoft .NET Framework 4.5
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
- 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
- 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”.
- 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.
- 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).
- 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:
For further instructions and installation screenshots see Annex A in MSc thesis (in portuguese).
Running the sample ATM project
- Download and unzip the SBT_ATM.zip file
- Open the ATM.eap file with Enterprise Architect. The model should have a “Dynamic View”, with two sequence diagrams, and a “Logical View”.
- Click the right mouse button over the ATMTest folder in the “Dynamic View” and select Add-in->Test Generator->Preferences.
- 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
- 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.
- Check the test results and coverge information in the sequence diagram inside the ATMTest folder.
Experimenting with the ATM project within Eclipse
- In Eclipse, create an AspectJ project named ATM (or with a name of your choice)
- Import (drag and drop) the Java source files of the ATM sample to the newly created project
- Add the junit.jar libray for JUnit3 to the ‘Java Build Path’ of the ATM project (Add Libraries -> JUnit -> JUnit Library Version=JUnit 3)
- Add the traceutils.jar file to the ‘Java Build Path’ of the ATM project (Add External Archives …)
- 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 …)
- Build the project
- 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]>.