Questions? Feedback? powered by Olark live chat software

ABAP Development

Editing ABAP in Microsoft Visual Studio Code – Part 2

I’ve always found the developer experience in ABAP to be quite underwhelming. Eclipse is a big improvement, but still a far cry from what is available to most other languages. That’s why I’m writing a Visual Studio Code plugin.

Some time back I posted a blog here about this project, which I’ve been working on in my own time alongside the various other things we’re looking into here at Basis Technologies during working hours (like the use of abapGit). 

Today I’m happy to announce some progress in 2 areas of my plugin which fared pretty badly: source control management and unit testing.

abapGit integration

You can now perform the most common operations with the standard code UI:

  • see what files were modified in your abapGit projects
  • see the diff between the local version and the repository one
  • commit them to your repository
  • pull sync your local code with the remote repo
  • switch to another branch (unlike other scms it will not change your local files)
  • create new branches

It’s still a far cry from what is available in other languages, even without stuff like gitlens, but it’s more natural than the eclipse plugin.

Test explorer integration

Test explorer will show your unit test results in a sidebar, in the source code and in gutter decorations in the test code:

  • Tests will be added or updated in the sidebar and gutter every time you run a unit test
  • Results will be shown in the gutter decorations, you can use them to re-run the tests
  • If configured to do so, test explorer will automatically show the sidebar after every test run
  • You can rerun all tests, a single class or a method:
    • By clicking on the play button on the sidebar
    • By clicking on run
    • Automatically at every activation by enabling autorun (above is enabled for a single method)

The end result will look like this:

Errors will be shown in the problems pane:

I find the gutter decorations and run-on-activate to be particularly useful as they significantly shorten the feedback loop.

If test explorer is not installed or disabled the failed tests will be shown as errors:

…with an extra information message to inform the test was run and its outcome.

Debugging is not available in code yet, but external breakpoints in sapgui or Eclipse will work.

AbapCI for Eclipse also runs test on activation, but has a much different and bigger scope as it focuses on Abap Test Cockpit and testing whole packages rather than individual classes.

I hope you found this interesting. If you’d like to keep track of progress on this and some other things you can follow me on the SAP Community Network, and of course I’m planning to post more updates here on the Basis Technologies blog in future.

Share this post

Recent posts

Get a demo

Learn More About Our DevOps and Testing Platform


Read more

News, Technologies & Products