cancel
Showing results for 
Search instead for 
Did you mean: 

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

fwe1
Explorer
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

fwe1
Explorer
0 Kudos

During my search through TTD Topics, I stumbled on that post, which mentioned that packages

- task group 70000020 and package SWH:

- task group 56400001 and package WFUNIT 'Unittest für Workflow'

Beyond that the T-Codes SWUI_WFUNIT & SWF_UNIT_CONF and the packages SWF_TST, SWF_TST_WI_EXIT_API looks interesting. Has someone of you experiences with that tools/code?

Thx in advance