Skip to Content

Sharpen your ABAP Editor for Test-Driven-Development (TDD) – Part I

How to optimize your Performance by using the new ABAP Editor

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe”

– Abraham Lincoln

I have great pleasure when I´m doing TDD. For me it is obvious that the Tools that I use, I had to optimal apply in my Programming flow.

Of course, nothing is “out of the box” but find out here how I customize and use my Programming Tools.

ABAP Editor Customization

In my opinion, following aspects are relevant for a smooth use:

  • Own Templates for the most used commands
  • Navigation Options
  • Tips and Tricks for using the Object Navigator

Creating own Templates

You know the Situation. Your are Programming some stuff, and some commands seem to be very annoying for you…

You type again and again the thousands assert_equal statement. And you peek for something faster, but than you continue with your next step.

This sound´s very familiar for you. And here stop and customize your ABAP Editor. In the new ABAP Editor it is possible to customize user-specific Templates.

For following commands I have an own Template:

  • local Classes
  • local Test-Classes
  • Testmethod definition
  • Testmethod implementation
  • assert_equals Statements
  • fail Statements

Navigation Options in the new ABAP Editor

Everything is ok. You write your Unit-Test. Make it to run “green”. And then you refactor the sources. But with time you have to scroll all the time.

At the TOP of your Editor the Test-Classes were defined. And at the BOTTOM of your Editor the Implementation-Part will grow and grow.

And then you have all the Time to scroll up and down and up and down…

Would it be nice to have more Options?

And here is the time to use:

  • the Split-View Option
  • create own local Bookmarks
  • Search and Replace of Code

Tips and Tricks for using the Object Navigator

Imagine you have a smooth Package- and Class-Architecture. For some Tests you have to instanciate some classes (Preconditions) and this is necessary for all Testmethods. Then you go to the Taskbar and Press ‘Pattern’ or hit the Keyboard-Shortcuts CTRL+F6 for inserting an Statement.

And of course you ask you the same question as I asked me: Have I more Options?

And yes, you can drag an drop from the Object-Navigator the relevant Methods to insert Statements in the Editor.

My experience is…

All the above Helpers make TDD a lot of easier, and the Development process is much faster and not to forget it make Programming a joy!

Your experience is?

What are your experiences with this Options?

Have you something different that works for using TDD in the ABAP-World?

  Further Information

Blogs in this Series:

To report this post you need to login first.

2 Comments

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

  1. Hendrik Neumann

    Hi Damir,

    I’m a big fan of Unit Tests but don’t like the ABAPUnit tools very much… It gets better with ATC and especially with ADT (Eclipse) but even then does not resemble the ease of uese you get e.g. in Java using Eclipse or NetBeans. Hence your tips are very welcome 🙂

    I especially like the idea of using templates for assert_equal et al. Why don’t you share yours with us here as a starting point.. would be great!

    BTW I find myself always switching between two windows: one with the class under test and one with the local test class..

    Cheers

    Hendriik

    (0) 
    1. Damir Majer Post author

      Hi Hendrik,

      thanks for your reply… especially that you find, that using templates in the new ABAP Editor is a good idea 🙂

      Stay tuned in my coming soon next Blog-Post i will share my Templates…

      Cheers,

      Damir

      (0) 

Leave a Reply