Skip to Content
0
Aug 11, 2023 at 02:53 PM

Unit Test for ABAP Workflows - especially, for IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED

123 Views

Dear ABAP Devs,

I had to implement a Program Exit for the Workflow Interface IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED. Under certain circumstances, I can't start the workflow for testing and I thought the best way to test my implementation of this Interface is the Unit Test way. Unfortunately, I have problems to define and assign the Import Parameters for that Method signature in my unit tests.

- Do you know how to get or create the Workflow Context, so that I can test the IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED in an automated test-driven manner?

- And by the way, do you know some resources how to use Test-driven Development, Unit Test Framework in conjunction with (object-oriented) ABAP workflow?

I am very grateful for every advice. Thank you very much in advance!

All the best#

Florian

P.S. In relation to SAP OData Gateway, SAP provides a helper method /iwbep/if_mgw_conv_srv_runtime~init_dp_for_unit_test for creating a request context, which enables Unit Tests for the DataProvider classes and Gateway Framework (see blog). Something similar would be nice for testing my Object Oriented ABAP Workflow Implementation. Do you know something exist similar exist for SAP Workflow as well?