Workflow Testing
Workflow Testing
Workflow testing
Damir Robi
Advanced Technology and Services, ICT for Government and Enterprise Segment
Ericsson Nikola Tesla d.d.
Krapinska 45, 10000 Zagreb, Hrvatska
Telefon: +385 1 365 3448 Fax: +385 1 365 3610
E-mail: [email protected]
Business process management systems become very or manual activities (people work) or both. A workflow
popular in developing enterprise systems today. Workflow management system, like IBM FileNet Business Process
activities as subset of business processes does not include only Manager, is a software system that defines, creates, and
interaction with the human user but they also interact and manages the execution of workflows through the use of
communicate with other software applications and systems software, running on one or more workflow engines,
which functionalities are included in business process. As which is able to interpret the process definition, interact
workflows become more and more complex the probability with workflow participants and, where required, invoke
that they are designed with errors increase. Consequently the the use of IT tools and applications [2]. The important
need for testing the correctness of running workflows in the achievement of workflow management is the explicit
phase of designing or immediately after becomes bigger. Such representation of process structures in process models and
workflow testing includes checking whether the expected the controlled enactment of business processes according
activities are executed and workflow data properties have to these models.
correct value. However, supporting tools for such workflow Developing workflows which some of them are quiet
testing is very poor. This paper addresses the problem of complex, we have always facing the problem of real-life
automated workflow testing in early development cycle and testing those workflows because of lack of a workflow
describes testing tool we developed for the purpose of real-life testing tools. Term real-life testing means performing tests
testing of workflows running on IBM FileNet Process Engine. on process instances running on workflow engines.
Therefore workflow tests performed by workflow „test-
infected“ developers [3] are always done manually without
I. INTRODUCTION any systematic approach or automation. Real-life testing of
workflows is left for system testing when mistakes cost
Each product that every company provides to the market much more then in earlier phases. So we decided to find
is the outcome of a number of organized activities which out how to test workflows in more efficient way.
makes business process. Business process activities can be In Section II I will present FileNet Business Process
performed by the company’s employees manually or by Manager. All tests that WorkflowTester run are performed
the help of information systems. For the last ten years on that workflow engine. In section III will be discussed
many companies were very interested in informatization of about problems which inspired us for implementing
theirs business processes and getting software for WorkflowTester. Functionality of WorkflowTester and
managing and controlling business processes called WorkflowTester as example are described in sections IV
business process management system. To increase the and V.
quality of such enterprise solutions, where the accent is
given on business process automation, the need is to II. FILENET
provide a way of real-life testing of business process
definitions in runtime. In this paper I will try to describe
FileNet, a company acquired by IBM in 2006,
our approach for such testing which we used in our
developed software to help enterprises manage their
projects. In later chapters will also be described
software and business processes. The FileNet system
WorkflowTester prototype tool we have developed in
includes a FileNet Process Designer, a FileNet Process
purpose of helping us to automate and satisfy testing
Administrator, and a FileNet Process Engine [4].
requirements. At this moment WorkflowTester supports
only IBM FileNet Business Process Manager. First, a process structure is modelled graphically with
the Process Designer and tasks are assigned to work
Business process is a set of one or more linked
queues. These work queues and the associated users are
procedures or activities which collectively realize a
created outside the Process Designer. Graphical
business objective or policy goal, normally within the
representation of the process is without formal semantics
context of an organizational structure defining functional
and without verification of correctness [Figure 1]. Then,
roles and relationships. At the highest level, workflow is
the created process definition is feeded to the Process
all those activities that combine the processes, the tools
Engine to start the execution of the workflow. The
and the people all working toward a business objective. In
execution data for individual cases is logged by the
the context of automation, ‘workflow’ has a specific
Process Engine and can be accessed with the Process
meaning where Workflow is the automation of a business
Administrator.
process, in whole or in part, during which documents,
information, or tasks are passed from one participant to Process Engine is the core of IBM FileNet BPM. It is a
another for action, according to a set of procedural rules state machine which handles all workflow routing. Two
[1]. Actions can be automated activities (software-based) types of Workflow activities are supported by Process
320 on April 19,2024 at 16:36:58 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: Pontificia Universidad Javeriana. Downloaded
diagram, as well as executable properties used at run time.
XPDL should be input for creating test cases. In that way
we will also satisfy a requirement not to alter existing
workflow definitions. For running test cases will be used
workflow engine API wrapped and exposed via interface
as vendor specific adapter. With little coding it will be
possible to support many available workflow engines on
the market today.
Another thing we were thinking about is automation.
Since it will be made for workflow developers it must
Figure 1: Workflow created in IBM BPM Process Designer provide test automation and regression tests.
321 on April 19,2024 at 16:36:58 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: Pontificia Universidad Javeriana. Downloaded
Test Organization
Test organization should define how test cases are
structured and what they include. WorkflowTester must
have a functionality which helps tester in creation of test
cases. Following logic, a test case can be a workflow Test Result
scenario. But such test cases can be very big and too result types
complex. For example, two different workflow scenarios
have the same sequence of ten activities and differ in last Test Execution
activity (of course not end activity). If test case is equal to execution support
workflow scenario tester will do almost the same job twice
during creation of two test cases. To avoid this repeating, Test Organization
test cases should be granulated in smaller parts, let us call organization form
it workflow blocks. Composition of two or more workflow
blocks makes one workflow scenario. In that case, in Test Creation
example above we will have three workflow blocks. One specification od test case creation
of them will be common for both scenarios.
All test cases must be integrates into one, representing
the complete test case. The true value of automated testing Figure 3: WorkflowTester components diagram
comes from executing many test cases as often as possible.
Therefore, it is necessary to be able to group tests into
composite tests (so-called test suites). Test suites should be and parameters depending on what type the specific
created separately from test cases having only the activity is (system activity, user activity, submap activity).
information which test cases will run and in what order. Those objects are then used by Test case Builder
component which deals with creation of test cases. It
Test Execution interacts with presentation layer in order of navigating user
when he builds workflow scenario for test. This
Test execution means creating a harness around the component is also responsible for saving test data in
process under test, executing the process, and handling structured format. At this moment it is XML file. Test
input and output data for a concrete process instance Runner deals with test execution and test evaluation. Test
according to the specification. Approaches to the test execution has two stages: Initialization and test run.
execution can be real-life testing and simulation testing. Initialization includes loading test cases from outer XML.
We chose real-life testing which means actually process on After that, Test Runner communicates through workflow
engine and invoking it using proprietary API. In our case engine adapter (in our case it is FileNet BPM adapter) in
FileNet API [8] is decoupled from WorkflowTester test order to retrieve workflow-related operations. User
execution engine in the way of wrapping that API with interface component consists of two main forms: Test
exposed interface so Workflow tester can be independent creator and Test Runner. As their name say, first one is for
as much as possible for running tests with other workflow test creation and second one for their running.
engines. Note that this means that all outer system which
communicates with process under test must be replaced by Usage Example
„mock“ [9] objects.
When WorkflowTester is started and workflow
definition is loaded via XPDL file, Test Creator form
Test Results
shows up. The upper part of the form is dedicated for
Execution of the tests yields results and statistics, which specific workflow path navigation. During the creation of
are to be presented to the user at a later point in time. The test scenario unambiguously are assigned previous and
most basic of all unit test results is the boolean test current step. From fall down menu with label „Next step“
execution result which all test frameworks provide: A test user chooses next activity. Menu contains only those
succeeds, or it fails. Test result report must also include activities which are followed by current activity. When
path coverage and activity coverage. Full activity coverage „Next step“ is chosen clicking on right arrow command
is reached if all activities in the workflow are executed at button previous step becomes next step and next step
least once. Path coverage covers all possible paths through becomes current step.
the whole workflow. Lower part of the form contains two tables. First table
has two columns. In left column are showed only exposed
workflow properties of current step. Right column fields
V. WORKFLOW TESTER are editable so user enters the property values which will
be sent to the process under test just before committing
current activity. In second table are showed all workflow
Figure 3 shows main components of WorkflowTester properties. Right column is also editable and contains
developed in Java [10]. Each component is described values which are compared to those in process under test.
below. If no value is set then this property will not be checked.
Those property values can be filled also when test is
Workflow is loaded by XPDL Loader component. It
running. In that case the input form with properties will
creates NxN matrix of activity objects where N is number
show up enabling the user to input test data. This feature
of activities in workflow. Objects contain specific
can be enabled by checking the checkbox „Manual input“
functions
for specific activity. This form is also used for creating
322 on April 19,2024 at 16:36:58 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: Pontificia Universidad Javeriana. Downloaded
workflow segments. The only difference between creating Once some changes have been performed,
workflow scenarios is that first and last activity must be WorkflowTester may be used to check it immediately if
marked with flag. the behavior of the workflow is still identical.
After loading of XML file with at least one workflow Although this tool has helped us in few projects in early
scenario Test runner can be started. In Test runner form discovering errors there is lot of space for its improvement
user can chose what test cases or what test suites will be as much as improving the test methods. At this moment
performed. Test results will be presented in a table in the GUI does not meet standards of simplicity and intuitivty so
form. If test case has passed then this test case gets status there should invest much more effort to improve it.
OK. Otherwise if it fails the status will be FAILED with Implementing graphical workflow process viewer will
some explanation. Test is successful if workflow has greatly improve creation of workflow test cases.
passed through all expected activities and if all test
statements are asserted. In the same form path and activity
coverage is expressed in percentage. REFERENCES
323 on April 19,2024 at 16:36:58 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: Pontificia Universidad Javeriana. Downloaded