=Paper= {{Paper |id=Vol-1701/paper1 |storemode=property |title=Modeling Test Cases in BPMN for Behavior-Driven Development (Extended Abstract) |pdfUrl=https://ceur-ws.org/Vol-1701/paper1.pdf |volume=Vol-1701 |authors=Daniel Lübke,Tammo van Lessen |dblpUrl=https://dblp.org/rec/conf/emisa/LubkeL16 }} ==Modeling Test Cases in BPMN for Behavior-Driven Development (Extended Abstract)== https://ceur-ws.org/Vol-1701/paper1.pdf
                           Jan Mendling, Stefanie Rinderle-Ma, Eds.: Proceedings of EMISA 2016,
                                                       Gesellschaft für Informatik, Bonn 2016 1


Modeling Test Cases in BPMN for Behavior-Driven
Development (Extended Abstract)

Daniel Lübke1 Tammo van Lessen2



Abstract: Validating analytical business processes and testing executable ones are difficult task in
process development projects. Within the project Terravis, which builds a process hub for enabling
fully digitalized mortgage processes between Swiss land registries, banks, notaries and other parties,
these tasks became problematic. For improving stakeholder communication and extending the test
scope, behavior-driven development was adapted to BPMN and business processes. This technique
was introduced and very well received within the project, leading to better process documentation
and better tests.

Keywords: BPMN, Process Elicitation, Business Process Modeling, Scenarios, Model-Driven Test-
ing, Behavior-Driven Development




1    Introduction

Business Process Modeling is a challenge in practice: Many stakeholders need to be in-
terviewed and their opposing views integrated into one target solution. The project Ter-
ravis [BLM14] faced this problem heavily when it started to build a process integration
platform for all land registry-based business throughout Switzerland. Prior to this project,
there was no overall process description on how mortgage-related business processes, e.g.
increasing an existing mortgage because a bank customer wants to increase his/her loan
for repairing the roof, are executed. Cantonal laws differ so that there was and still is no
Swiss-wide homogeneous solution, banks and involved notaries conducted business dif-
ferently and non-standardized. The financial crisis increased the pressure on the banks to
operate more cost-efficiently in 2009. One possibility was to digitalize the business that
was completely paper-based before.

Digitizing business processes meant to first understand the different variations of the same
business process especially taking into accoutn the cantonal legistlature and different no-
tary systems. The second step was to standardize the processes and used documents as
much as possible before they were implemented in the Terravis Process Hub. Such an
endevour meant designing and especially validating the new business processes with all
stakeholders that up to this point were not confronted with any BPM-related project nor
had prior knowledge of BPMN.

1 innoQ Schweiz GmbH, Gewerbestr. 11, CH-6330 Cham, daniel.luebke@innoq.com
2 innoQ Deutschland GmbH, Krischerstr. 100, D-40789 Monheim am Rhein, tammo.van-lessen@innoq.com
The Process Hub consists of a central BPMS running executable business processes and a
Web application that can be used to start and control running processes. Alternatively, all
stakeholders can integrate via SOAP services.
This extended abstract will summarize the original paper [LvL16] describing the Behavior-
Driven Development (BDD) Approach to find a practical way to validate new business
processes and build executable test cases for Terravis efficiently.


2   Motivation
Terravis was in production for 3 years before first problems required a new approach to
process modeling and testing. The platform grew and processes got more complex [Lü15].
Feature Requests came in via email and were not documented in appropriate quality in the
existing process models. Also the impact of these changes were more and more unclear
because very often stakeholders did not express enough constraints und clear business
rules for the change scope. The communication between process stakeholders and the
development team got interrupted, which is a common problem [SR16].
One essential change in Terravis’ environment led to a new approach to process validation
and testing because it significantly increased the number of test cases:

Banks started to integrate their core systems to enable process integration with Terravis.
However, two standard-banking-solution providers supported only an older version of the
service interfaces. This in turn led to two new huge-impact features.
The first feature was multi-version support. When a new service version became available,
external systems might use either the new or the old version. However, not all the necessary
components could be tested with the Web application before because it supports only the
newest service version. So, system tests conducted through the Web application cannot
catch defects in the version transformation component.
The other requested feature was multi-channel capability. The banks realized they could
not rely only on their systems’ capabilities. In order to access new features that are only
available via the new service versions, they had to use the Web application. This meant
that processes can be started via either the Web application or the integrated system and
are “sticky”, i.e. all messages for that process instance are routed to the initiating system.
However, the multichannel feature also could not be tested with the Web application alone.
The new approach needed to enable the testing of the new architectural features, provide
test auomation and increase process documentation quality as well the ability of the project
to validate business process descriptions.


3   Approach
We decided to use a modified Behavior-Driven Development (BDD) approach. BDD [No06]
is an evolution of Test-Driven Development (TDD) [Be03] that also integrates elements
                        Jan Mendling, Stefanie Rinderle-Ma, Eds.: Proceedings of EMISA 2016,
                                                    Gesellschaft für Informatik, Bonn 2016 3




                           Fig. 1: Simple BPMN Test Case [LvL16]



from Domain-Driven Design (DDD) [Ev03]. While the roots are for sure in the field of
software development, the approach is well-suited for business process design and mod-
elling. Instead of the traditional Given-When-Then-structure for describing system behav-
ior, the modified approach uses BPMN [SR09] scenarios.
A scenario is a completely sequential and deterministic business process model. Collapsed
pools represent the process or the system to be described/tested and all process participants
are modeled as pools exchanging messages with the test subject. A sample test case is
shown in figure 1.
Test Data and Assertions from a business point of view, which are also useful for dis-
cussing and validating the business process with stakeholders, are added as documentation
to the BPMN elements.
The free text is not completely free, but must conform to templates. These templates are
defined according to the needs of the scenarios by the process developers. The same is
done for the assertions. Finally, the pools and messages are mapped to WSDL the WSDL
constructs Services, Porttypes, and Operations.
These mappings are used by a generator for generating an executable BPELUnit test
suite [Lü07]. BPELUnit is the framework already used for unit testing all processes and us-
ing it for other SOAP-based tests was a natural choice. However, the conceptual approach
is independent of BPELUnit and even WSDL & SOAP.
The project has adopted the new approach and modeled test cases for the 10 most fre-
quently used process variants. Because the test cases are independent of any technical
details, the test cases can be used with other technical mappings for different service ver-
sions. They are successfully integrated into the nightly build and test the current process
implementations together with the current service and infrastructure implementations (e.g.
ESB, digital archive, document generation, . . . ).
4    Conclusions & Outlook
The BPMN-based BDD approach uses scenarios modeled in BPMN with text-based de-
scriptions of exchanged messages and assertions. It was very well received in the project
Terravis and really allows BPMN to serve as a “lingua franca”: BPMN is not only to used
for formulating an analytical model that is further refined into an executable model but it
is also used for describing easy to understand scenarios that are also executable test cases.

Besides the technical motivation of developing well-understood test cases, the scenarios
serve a validation and documentation purpose: The process documentation is made under-
standable for non-BPMN people and can be used in workshops to discuss process steps
and variants. The project now establishes more and more test cases for existing processes.
All new processes are documented with scenarios for getting an analytical validation from
all stakeholders before they are transformed into executable test cases by the development
team. All test cases are executed daily as part of the nightly build.
We have received feedback to this approach by both industry and academia. Further for-
malization and conceptual support for other integration technologies like REST services
are the next possible research steps.

The work summarized in this extended abstract has been published in [LvL16].


References
[Be03]    Beck, Kent: Test-Driven Development by Example. Addison-Wesley, 2003.
[BLM14] Berli, Walter; Lübke, Daniel; Möckli, Werner: Terravis – Large Scale Business Process
        Integration between Public and Private Partners. In (Plödereder, Erhard; Grunske, Lars;
        Schneider, Eric; Ull, Dominik, eds): Lecture Notes in Informatics (LNI), Proceedings
        INFORMATIK 2014. volume P-232. Gesellschaft für Informatik e.V., Gesellschaft für
        Informatik e.V., pp. 1075–1090, 2014.
[Ev03]    Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software.
          Addison-Wesley, 2003.
[Lü07]   Lübke, Daniel: Test and Analysis of Service-Oriented Systems. Springer, chapter Unit
          Testing BPEL Compositions, 2007.
[Lü15]   Lübke, Daniel: Using Metric Time Lines for Identifying Architecture Shortcomings in
          Process Execution Architectures. In: Software Architecture and Metrics (SAM), 2015
          IEEE/ACM 2nd International Workshop on. IEEE, pp. 55–58, 2015.
[LvL16]   Lübke, Daniel; van Lessen, Tammo: Modeling Test Cases in BPMN for Behavior-Driven
          Development. IEEE Software, 2016:17–23, Sep/Oct 2016.
[No06]    North, D.: Introducing BDD,. http://dannorth.net/introducing-bdd, 2006.
[SR09]    Silver, Bruce; Richard, Bruce: BPMN method and style, volume 2. Cody-Cassidy Press
          Aptos, 2009.
[SR16]    Schulenklopper, Jochem; Rommes, Eelco: Why They Just Don’t Get It: Communicating
          about Architecture with Business Stakeholders. IEEE Software, 33(3):13–19, 2016.