Test Doubles are coming to Function Modules

More of an announcement rather than a blog: Drumroll for the latest in Unit Testing Frameworks, Function Modules.

Function modules have always been the thorn in the side of anyone trying to write ABAP Unit Tests. The only sensible way to mock a call to a function module was to wrap the FM into a class method and then mock that, either via the OO Test Double Framework or by coding explicit test doubles.

Well, the next shiny new version of ABAP includes a Function Module test double. And while I could write a nice blog with examples, SAP have stolen my thunder and done a sterling job of documenting it in good detail with great examples over here. Personally I really like the simple, easy to understand

For those on 7.6, have fun, the rest of us will have to be very patient. But at least for those on lower versions it’s always handy to know what’s coming in order to avoid spending too much resources on reinventing a future wheel.

Have Fun!