TEST PROCEDURE

Reverse engineering Java2UML

 

Author: Elorri Benoit <elorri.benoit@gmail.com>


 

Open Eclipse Luna. Create a new Java project called ProjectTest. Right click on the source folder (src) and choose the Import option like the following:

The following window will appear:

 

Choose File system and click on Next.

Then, click on Browse, select the source folder of the pluginorg.eclipse.umlgen.reverse.java.testand the following window will appear:

Select the three folders (testctivity, testPackage and testStuctural) and click on Finish.

Right click on the project and choose the UML Generators option and Generate UML Model + Diagrams.

The following window will appear:

Select All to generate all the activity diagrams and click on Finish. Four files will be created:

 To find all the diagrams, click on the file ProjectTest.di and open the project in the Model Explorer (usually at the bottom left of the screen):

 

The tests are divided into two parts (two packages): one for class diagrams (testStructural package) and the other for activity diagrams (testActivity package).

Open the package testStructural and select the Diagram testStructural.

Class diagram of the testStructural package (ordering everything manually):

This class used to test several things :

- the enumeration

- the method (with parameter or not, with return and the call method)

- the import

- the interface

- the implements

- the abstract class

- the extends

- the class

- the viariables (static or not) and their visibility (public, protected, private)

- the lists and collections

- the association

 

 

To find the activity diagrams, open the testActivity package in the Model Explorer.

You will find 3 classes (TestWhile, TestFor, TestIfElse). The class TestWhile contains two methods which test the loops while without and with break.

 

 

 

Activity diagram of the While test (ordering everything manually):

 

 

 

Activity diagram of the While test with a break (ordering everything manually):

 

 

Activity diagram of the For test (ordering everything manually):

 

 

Activity diagrams of the If else test(ordering everything manually) :