Testing an AWM Plug-in Project

This topic provides information on how to test your AWM plug-in project.

Testing an Eclipse plug-in project requires a new Eclipse instance to be started. Micro Focus recommends you start the additional Eclipse instance in debug mode instead of run only mode. Debug mode enables you to set break points in the plug-in's java classes so that execution will stop when the break point is reached and control is returned to the calling Eclipse instance showing the current execution state in the Eclipse Debug perspective.

To start Enterprise Developer in debug mode:

  1. Right-click the shortcut for Enterprise Developer for Eclipse.
  2. Click Properties.

    This opens the Enterprise Developer for Eclipse Properties dialog box.

  3. In the Target field, at the end of the existing text, type -debug

    The field content should look like this:

    "C:\Users\Public\Micro Focus\Enterprise Developer\eclipse\eclipse.exe" -debug
  4. Click OK.
  5. Double-click the modified shortcut to Enterprise Developer for Eclipse.

    In addition to starting Enterprise Developer for Eclipse it will also open a corresponding debug log.

Testing an AWM plug-in project also requires the AWM model which contains the features you want to test. The AWM plug-in extension templates all provide a test model under the models folder of the project. If you have developed your own AWM extension plug-in, you have to create an AWM model which makes use of the features provided by your plug-in.

In the debug Enterprise Developer for Eclipse. Open your Eclipse plug-in project in the Plug-in Development perspective:

  1. Right-click the Eclipse plug-in project to be tested in the Project Explorer view.
  2. Click Debug As > Debug Configurations.
    Note: If you have already tested the plug-in before, you can select the debug configuration which you have already created.

    This opens the Debug Configurations dialog box.

  3. Right-click Eclipse Application, and then click New Configuration.

    This displays the attributes of the new debug configuration in the right pane.

  4. In the Name field, type a descriptive debug configuration name.
  5. Click Apply
  6. Click Debug.

    This will display several messages in the Console view and start another Eclipse instance.

  7. In the second Eclipse instance switch to the Team Developer perspective. Click Window > Perspective > Open Perspective > Other.

    This opens the Open Perspective dialog box.

  8. Click Team Developer.
  9. Click Open.
  10. Create an AWM Custom System in the Application Explorer view. See AWM Custom System for more information.
  11. Still in the second Eclipse instance create a general Eclipse project under the Project Explorer view.
  12. Create a model's folder under your general Eclipse project.
  13. Copy your AWM test model to this new model's folder.
  14. Right-click your AWM Custom System in the Application Explorer view and select Add Application.
  15. In the Custom AWM System dialog browse to your AWM model and give it a meaningful name.
  16. Click Finish.

    This will create a reference to your application under the AWM Custom System in the Application Explorer view.

  17. Right-click the application reference under the AWM Custom System and then click Load Application.

    The application is loaded and can be used according to the applications purpose.

If you have set break points in your first Eclipse instance, execution will be halted when a break point is reached. Control will switch back to your first Eclipse instance in this case. If you are not already in the Debug perspective in your first Eclipse instance, you are asked to switch to this perspective.

You can use the Eclipse debug facilities to debug step by step through the AWM application running in the second Eclipse instance.