Skip to Content

Short read

As an add-on for ABAP in Eclipse the plugin ABAP Continuous Integration contains some features for a Continuous Integration environment. The plugin can be downloaded from the Eclipse Marketplace.

After installing the plugin there is only one configuration setting to be done in the Eclipse preferences (section ABAP CI) to get the plugin up and running:

In the first textbox (ABAP Development Project) the display of your ABAP development system has to be inserted. The display name can be found in the Eclipse Package Explorer and has the form <system>_<client>_<user>_<language>, e.g. A4H_001_developer_en.

After completing these steps each time when you modify a development object all ABAP packages added to the new view “ABAP Continous Integration” are automatically executed. Thus you get immediate feedback whether your last code changes are correct or not.

Long read

With the integration of ABAP into Eclipse a state of the art development environment is available for developing in ABAP. One thing I am still missing is a tooling for a Continous Integration (CI) environment.

Unit tests can be performed with one additional button click. But taking into consideration that one of the main characteristics of a CI system should be full automation this is often one click too much.

Do you really continuously check if all your unit tests are still green?

A daily check of all ABAP unittests can be done for example with Jenkins. But often its really valuable to get an immediate feedback when a code change is breaking a core functionality of the system.

Therefore I started to create an Eclipse plugin which beside some other features runs automatically all ABAP unit tests each time one development object is changed.

The installation of the plugin is quite straightforward. In Eclipse->Help->Eclipse Marketplace you can find the plugin under ABAP Continuous Integration – well actually a Beta-Version, so feel free to comment bugs or ideas.

If you want to see some more details, the actual source code is available on github: abapCI.

 

After installing the plugin there is only one configuration setting to be done in the Eclipse preferences (section ABAP CI) to get the plugin up and running:

In the first textbox (ABAP Development Project) the display of your ABAP Development system has to be inserted. The display name can be found in the Eclipse Package Explorer and has the form <system>_<client>_<user>_<language>, e.g. A4H_001_developer_en.

The other configuration parameters which can be set actually in the Eclipse preferences page are not mandatory for the core functionality. The check box “Run ABAP Unit tests when file saved” is recommended as this activates the core functionality of the plugin.

After the successful installation of the plugin an additional icon in the menu bar can be found. Clicking this icon an additional view – ABAP Continuous Integration – is opened.

On the first start the view of the plugin will be empty. By clicking into the empty area of the view with the right mouse button a context menu is opened with four options.The third menu entry is “Add new package” which can be used to add ABAP packages to a test run performed after each change of a development object.

The actual state of the unit tests of each package is shown in the column Unit test.

A failed test is indicated with NOK in the column Unit test and optionally with a change of the Eclipse color theme.

There are already some other features realised, in beta mode:

  • Remote build execution for Jenkins jobs
  • Change of the color theme when a test run is broken
  • Cyclic test runs also in case no development objects are changed

But for the beginning I leave you with the core functionality – hoping that you get some benefit out of it.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Fabian Lupa

    Really interesting! One question: How does this compare to the existing ATC integration in Eclipse? Like my usual workflow is:

    1. Change code
    2. Save, Ctrl+S
    3. Activate, Ctrl(+Shift)+F3
    4. Run ATC checks, Ctrl+Shift+F2
    5. Look through the ATC Problems tab

    And of course ATC checks on transport release. Job based daily checks on packages and even workflow integration also exists I think?

    I assume the Jenkins usage is nice if you already use it for non-sap-development and therefore cannot only rely on a central ATC system.

    (0) 
  2. Andreas Gautsch Post author

    Hi Fabian!

    Currently the plugin does not include ATC checks but I was already thinking about them as a next feature. Lets see if I find the time or even somebody else likes to do it.

    Regarding the workflow in ABAP in Eclipse. My first target was to automate the functionality Run Unit tests, like:

    1. Change Unit tests
    2. Run As -> ABAP Unit test (Ctrl + Shift + F10)
    3. Change implementation
    4. Run As -> ABAP Unit test(Ctrl + Shift + F10)

    Where step 2 and 4 is automatically performed each time a development object is saved (I did not yet find a possibilty to listen on the Activate event itself).

    Well in the case you need some details about the fail reason of the unit test, especially which unit test failed the only possibility is still the Abap Unit Runner view.

    But theĀ  plugin maybe saves you some time and effort when after a code change the tests turn as expected green thus you need not to manually rerun them in the Abap Unit Runner.

    And I absolutely agree with you too in the point of the jenkins usage.

     

    (1) 

Leave a Reply