<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>March</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>A BPMN Profile for Test Case Execution Visualization</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Daniel Lübke</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Digital Solution Architecture GmbH</institution>
          ,
          <addr-line>Hannover</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Leibniz Universität Hannover, FG Software Engineering</institution>
          ,
          <addr-line>Hannover</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>01</volume>
      <issue>2024</issue>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>Testing executable business processes, e.g., developed in BPMN 2.0 or WS-BPEL, is an important task within development projects. However, this task is labor-intensive due to the amount and scale of interactions of a test framework (e.g., BPELUnit) with the process under test. We want to help testers to debug test case failures by visualizing the test run information as a BPMN diagram. We developed a visual, BPMN-based notation for visualizing test runs, implemented a generation from BPELUnit test suites and execution logs to the newly defined format, and applied this in an industrial project. While no thorough validation has yet been performed, early results indicate better understandability of our notation compared to raw test logs.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;BPMN</kwd>
        <kwd>Test Case</kwd>
        <kwd>Visualization</kwd>
        <kwd>Profile</kwd>
        <kwd>BPELUnit</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Motivation</title>
      <p>
        Testing executable business processes is an important task in many digitization projects: errors in
critical business processes are a huge risk for reputation and income of organizations. Therefore,
unit testing, e.g., with BPELUnit [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], is often one activity to improve functional quality.
      </p>
      <p>
        However, analyzing failing unit tests in executable business processes is often dificult,
because they integrate many partners that potentially are performing activities in parallel. As
such, test case logs containing successfully executed and failed activities alongside passed input
and output messages become large and are hard to analyze. While test frameworks indicate
which activity failed, further analysis is often required to pinpoint the underlying problem. This
is especially true, when test cases are generated, e.g, by using combinatorial test design [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]
because errors in the test case configuration are more likely than with manually written tests.
      </p>
      <p>
        We developed an approach to generate BPMN models, which help developers and testers to
easier analyze failed test cases. It builds upon a test case subset for BPMN [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and uses colors
and documentation to make test case execution information better accessible.
      </p>
      <p>This paper starts with a presentation of related work (section 2). Afterwards, the generation
approach and underlying meta models are presented in section 3, which are implemented in
a prototype application (section 4). At the end, a small validation in an industry project is
presented in section 5. Finally, conclusions are drawn and outlook on future work is made
(section 6).</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Visualizing test cases has been a research area of interest for quite some time. For example,
Cornelissen et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] visualized execution traces of unit tests with UML Sequence Diagrams to
help developers better understand the inner workings of software systems.
      </p>
      <p>
        But visualization is not only concerned with the test execution per se but also with its results.
For example, Opmanis et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] plotted test result data over time, and Dzidic [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] performed a
case study visualizing metrics of software tests as dashboards in the financial sector.
      </p>
      <p>
        However, more similar to the goals of this research, studies have been concerned with
visualizations to better detect faults: Jones et al. [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ] used coverage information for visualizing
which parts of the software have been covered by which test cases. Similar work has been
done by Koochakzadeh &amp; Garousi [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. They visualized dependencies in the program under
test on class dependencies and implemented this as an Eclipse plug-in. Wes et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] plotted
test executions as Multivariate Visualizations to cluster test cases and ease reasoning about
successfully implemented scenarios.
      </p>
      <p>Existing tooling can also be used to present more data to testers. For example, there is a tool
for the Camunda BPMN engine 1 to visualize test coverage metrics as a graphical overlay over
the process.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Definition, Meta Model and Generation</title>
      <p>
        A BPMN Test Execution Visualization is a BPMN model that shows all activities executed or
supposed to be executed during a test run, which conforms to the following constraints (derived
from the constraints for model-driven testing of executable business processes [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]):
1. It shows test case execution in a BPMN model,
2. it uses uncollapsed pools for each logical party in the test case plus one collapsed pool
for the process under test,
3. it only uses the following BPMN elements: tasks (user, service), events (catch/throw
message, timer), and gateways (parallel),
4. its message flows must originate or terminate at the collapsed pool for the process under
test,
5. it shows the status of each activity by color: red (error), yellow (interrupted), and green
(okay),
6. it contains additional diagnostic information in the BPMN elements’ documentations,
e.g., received and sent message payload.
1https://github.com/camunda-community-hub/camunda-process-test-coverage
collaboration diagram. Every mocked service, i.e., partner is represented by a pool. The process
under test itself is represented by a collapsed pool. This means that this visualization technique
will treat the process under test as a black box in contrast to other visualizations, e.g., those for
test coverage.
      </p>
      <p>If a mock sends a one-way message, a message throw event is added to its pool, if it receives
a one-way message, a message catch event is added. If it initiates a two-way message exchange,
a service task is added, and if it waits for a two-way message exchange a message catch event is
added followed by a message throw event. If the mock waits for a specified duration, a timer
event is added, and parallel branches within a partner is represented with parallel gateways.
Because BPELUnit is block-structured, it is easy to also add the merging parallel gateway.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Prototype Implementation</title>
      <p>Within this section we shortly describe some design considerations for the prototype application,
which contains as much functionality as required for trying it in the industry project (see
section 5). The prototype is available at https://github.com/dluebke/bpelunit-viz.</p>
      <sec id="sec-4-1">
        <title>4.1. Targeted Tool Chain</title>
        <p>Because we want to use colors for denoting tasks’ error status, we were required to settle
on one tool, because colors are not standardized in the diagram interchange format of the
BPMN 2.0 specification. We settled on the Camunda Modeler because it allows us to show the
documentation in a comparatively large text area in a side pane. Thus, developers can easily
select BPMN elements of interest and directly see exchanged information.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. XML Processing</title>
        <p>We used Java’s DOM and XPath API to read elements and attribute values from the BPELUnit
log. We have planned to add the processing of the BPELUnit test suite itself as described above.
However, the prototype does not yet resolve the original operation name as foreseen in the
concept.</p>
        <p>Internally, all metamodels are represented by model classes (BPELUnit, BPELUnit Log, BPMN
2.0). BPMN 2.0 can be serialized via custom serializers for the model classes.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Layouting</title>
        <p>The resulting layout of a test case visualizaton is illustrated in Figure 2.</p>
        <p>Because developers want to use the generated BPMN diagrams without further efort, we
were required to layout the diagrams as well. We simply layouted all flow nodes in a pool
horizontally. This approach works reasonably well because the diagrams contain no loops, few
gateways, and are mostly sequential.</p>
        <p>To reduce the average length of message-flows and number of line-crossings and thereby
making the diagram easier to comprehend, we ordered the pools based on the number of
contained flow nodes (events, tasks and gateways): The pool representing the process under
test is placed in the middle. The pool containing the most flow nodes is placed on top of it, the
pool with second most flow nodes is placed below it. The ordering progresses by adding the
pools descendingly sorted by the number of contained flow nodes on top and below already
layouted pools.</p>
        <p>Some tuning was required due to the the large amount of message-flows and pools: Because
nearly all task had straight vertical message flows to the process-under-test pool, most message
lfows overlapped. We resolved this problem by slightly ofsetting the horizontal starting point
within each pool.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Evaluation: Application in Industry Project</title>
      <p>
        For addressing quality concerns, Terravis [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] — a Swiss large-scale process integration platform
— has invested much in eforts for improving testing. Due to many changes to its BPEL
processes [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], extensive unit and integration tests based on BPELUnit [
        <xref ref-type="bibr" rid="ref1 ref15">1, 15</xref>
        ] have been developed.
Especially, with the generation of such tests with Combinatorial Test Design (CTD) [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] many
tests need to be debugged until the development of the generated test suites is completed.
Similarily, after extending processes newly introduced bugs needed to be identified and tests
adjusted.
      </p>
      <p>The project has so far used the visualization for 25 of its processes that are covered by CTD
tests executed with BPELUnit. The largest BPELUnit log file is 48 MB large containing 328 test
cases. The log file size is mainly influenced by the (large) XML messages being exchanged in
the covered process. The visualization thus reduces the cognitive load required by developers
because it filters out payload information initially although allowing users to access it via the
elements’ documentation as shown in Figure 4.</p>
      <p>Feedback by developers was positive and they indicated that the visualization helped them to
diagnose problems. However, further validation is required.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion and Outlook</title>
      <p>In this paper we presented a way to visualize test cases for executable business processes and
their executions as BPMN models. The proposed algorithm has been implemented in a tool
and successfully applied in an industrial case. Consequently, BPMN can be used as a single
language to model the business processes, model or visualize test cases (depending on the
testing approaches), and visualize test execution results.</p>
      <p>In future work we like to further validate the approach by conducting surveys and experiments
for comparing log-based analysis with analysis performed using our models with regard to
efectiveness of finding and fixing problems in test cases and executable business processes.</p>
      <p>We also made the prototype implementation publicly available so that everyone can use it
and perform such studies with us or independently. We are happy to collaborate with others
concerning research into optimizing the testing of executable business processes!</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>We like to thank all team members of the industrial case project Terravis for their participation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Mayer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          ,
          <article-title>Towards a BPEL Unit Testing Framework</article-title>
          ,
          <source>in: TAVWEB '06: Proceedings of the 2006 Workshop on Testing, Analysis, and Verification of Web Services and Applications</source>
          , Portland, USA, ACM Press, New York, NY, USA,
          <year>2006</year>
          , pp.
          <fpage>33</fpage>
          -
          <lpage>42</lpage>
          . URL: http://portal.acm.org/afiliated/citation. cfm?
          <source>id=1145718.1145723&amp;coll=ACM&amp;dl=ACM&amp;type=series&amp;idx=1145718&amp;part= Proceedings&amp;WantType=Proceedings&amp;title=International%20Symposium%20on% 20Software%20Testing%20and%20Analysis&amp;CFID=1483183&amp;CFTOKEN=32880799#</source>
          . doi:http://doi.acm.
          <source>org/10</source>
          .1145/1145718.1145723.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T.</given-names>
            <surname>Schnelle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          ,
          <article-title>Towards the generation of test cases for executable business processes from classification trees</article-title>
          ,
          <source>in: Proceedings of the 9th Central European Workshop on Services and their Composition (ZEUS)</source>
          <year>2017</year>
          ,
          <year>2017</year>
          , pp.
          <fpage>15</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Greenyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Vatlin</surname>
          </string-name>
          ,
          <article-title>Efectiveness of Combinatorial Test Design with Executable Business Processes</article-title>
          , in: D.
          <string-name>
            <surname>Lübke</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          Pautasso (Eds.),
          <source>Empirical Studies on the Development of Executable Business Processes</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>187</fpage>
          -
          <lpage>207</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          , T. van Lessen,
          <article-title>Modeling Test Cases in BPMN for Behavior-Driven Development (Extended Abstract)</article-title>
          ,
          <source>in: Proceedings of the EMISA Workshop</source>
          <year>2016</year>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>B.</given-names>
            <surname>Cornelissen</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. van Deursen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Moonen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zaidman</surname>
          </string-name>
          ,
          <article-title>Visualizing testsuites to aid in software understanding</article-title>
          ,
          <source>in: 11th European Conference on Software Maintenance and Reengineering (CSMR'07)</source>
          ,
          <year>2007</year>
          , pp.
          <fpage>213</fpage>
          -
          <lpage>222</lpage>
          . doi:
          <volume>10</volume>
          .1109/CSMR.
          <year>2007</year>
          .
          <volume>54</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Opmanis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kikusts</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Opmanis</surname>
          </string-name>
          ,
          <article-title>Visualization of large-scale application testing results</article-title>
          ,
          <source>Baltic Journal of Modern Computing</source>
          <volume>4</volume>
          (
          <year>2016</year>
          )
          <fpage>34</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>E.</given-names>
            <surname>Dzidic</surname>
          </string-name>
          ,
          <source>Data Visualization of Software Test Results : A Financial Technology Case Study, Master's thesis</source>
          , KTH, School of Electrical Engineering and Computer Science (EECS),
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Harrold</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Stasko</surname>
          </string-name>
          ,
          <article-title>Visualization of test information to assist fault localization</article-title>
          ,
          <source>in: Proceedings of the 24th International Conference on Software Engineering</source>
          , ICSE '02,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2002</year>
          , p.
          <fpage>467</fpage>
          -
          <lpage>477</lpage>
          . URL: https://doi.org/10.1145/581339.581397. doi:
          <volume>10</volume>
          .1145/581339.581397.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <article-title>Fault localization using visualization of test information</article-title>
          ,
          <source>in: Proceedings. 26th International Conference on Software Engineering</source>
          ,
          <year>2004</year>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>56</lpage>
          . doi:
          <volume>10</volume>
          .1109/ICSE.
          <year>2004</year>
          .
          <volume>1317420</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>N.</given-names>
            <surname>Koochakzadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Garousi</surname>
          </string-name>
          ,
          <article-title>Tecrevis: A tool for test coverage and test redundancy visualization</article-title>
          , in: L.
          <string-name>
            <surname>Bottaci</surname>
          </string-name>
          , G. Fraser (Eds.),
          <source>Testing - Practice and Research Techniques</source>
          , Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2010</year>
          , pp.
          <fpage>129</fpage>
          -
          <lpage>136</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>W.</given-names>
            <surname>Masri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Assi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Zaraket</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Fatairi</surname>
          </string-name>
          ,
          <article-title>Enhancing fault localization via multivariate visualization</article-title>
          ,
          <source>in: 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation</source>
          ,
          <year>2012</year>
          , pp.
          <fpage>737</fpage>
          -
          <lpage>741</lpage>
          . doi:
          <volume>10</volume>
          .1109/ICST.
          <year>2012</year>
          .
          <volume>166</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          , T. van Lessen,
          <article-title>BPMN-based Model-Driven Testing of Service-based Processes</article-title>
          , in: Business Process Modeling, Development, and
          <source>Support</source>
          <year>2017</year>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>W.</given-names>
            <surname>Berli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          , W. Möckli, Terravis - Large
          <string-name>
            <surname>Scale Business Process</surname>
          </string-name>
          <article-title>Integration between Public and Private Partners</article-title>
          , in: E.
          <string-name>
            <surname>Plödereder</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Grunske</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          Ull (Eds.),
          <source>Lecture Notes in Informatics (LNI)</source>
          ,
          <source>Proceedings INFORMATIK</source>
          <year>2014</year>
          , volume P-
          <volume>232</volume>
          , Gesellschaft für Informatik e.V., Gesellschaft für Informatik e.V.,
          <year>2014</year>
          , pp.
          <fpage>1075</fpage>
          -
          <lpage>1090</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          ,
          <article-title>Using Metric Time Lines for Identifying Architecture Shortcomings in Process Execution Architectures</article-title>
          ,
          <source>in: Software Architecture and Metrics (SAM)</source>
          ,
          <year>2015</year>
          IEEE/ACM 2nd International Workshop on, IEEE,
          <year>2015</year>
          , pp.
          <fpage>55</fpage>
          -
          <lpage>58</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lübke</surname>
          </string-name>
          ,
          <source>Test and Analysis of Service-Oriented Systems</source>
          , Springer,
          <year>2007</year>
          , pp.
          <fpage>149</fpage>
          -
          <lpage>171</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>