abapGit and unit test in visual studio code
I 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.
Today I’m happy to announce some progress in 2 areas which fare pretty bad: source control management and unit testing
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 will not change your local files)
- create new branches
Still a far cry from what is available in other languages, even without stuff like gitlens, but more natural than the eclipse plugin
Test explorer integration
Test explorer will show your unit test results in a sidebar and 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 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
- clicking on the 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, 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 focuses on Abap Test Cockpit and testing whole packages rather than individual classes
Thanks for your efforts for putting this in.
I have got one quick question - How do you integrate SAP GUI someone using group server & SSO login without username and password. I followed below link and it seems username and password is mandatory to provide.
Any lead would be much appreciated.
Thanks & Regards,
Once you logged in vscode the gui logon uses reentrance tickets and should work fine with group servers (I did test it t least once)
But for the initial login I'm afraid the only kind of SSO supported for now is OAUTH2. Works fine in cloud platform, didn't try it from anywhere else. If you have it working for fiori apps should work for this too, but getting the client secret could be complicated.
I did write about it recently here, the sample configuration there is the closest thing to a documentation for this feature I wrote so far.
Does the "Live Share" extension in VSC work with on-premise SAP systems, I am not seeing any documentation stating this.
Sadly that needs real files, doesn't work with my plugin
Thank You for the reply.
I got it , using test exporer, not application server .