<!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 />
    <article-meta>
      <title-group>
        <article-title>Automated Product Line Methodologies to Support Model-Based Testing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Shuai Wang</string-name>
          <email>shuai@simula.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shaukat Ali</string-name>
          <email>shaukat@simula.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Arnaud Gotlieb</string-name>
          <email>arnaud@simula.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Certus Software V&amp;V Center, Simula Research Laboratory</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Testing products in a cost-efficient way remains an attractive topic for Model-Based Testing (MBT) of product lines in both academia and industry, which can be addressed by employing systematic and automated approaches based on models (such as feature models and UML models). Cost-effective testing products can be divided into three main problems, i.e., test selection, test generation, and test minimization. Driven by the needs of our industrial problems for testing Video Conferencing Systems (VCSs) product line developed by Cisco, Norway, this paper presents Product Line Model-based Testing Methodologies (PL-MTM) to tackle the above-mentioned three problems for costeffective testing a product in product line, which includes: 1) an systematic and automated test selection methodology; 2) an automated test minimization approach; and 3) an automated and systematic test generation methodology.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Product Line Engineering (PLE) is well known to systematically capture and manage
commonalities and variabilities of a product line, which usually includes a number of
products [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. By employing PLE, cost-effective testing products in a product line can
be classified into three main problems; 1) Test Selection: Automatically and
systemically select a sub test suite including a set of relevant test cases for a product from the
entire suite available for a product line; 2) Test Minimization: Minimizing the test
suite obtained by the selection to eliminate redundant test cases for reducing the cost
of testing (e.g., execution time) while preserving high effectiveness (e.g., fault
detection capability); and 3) Test Generation: Automatically and systemically generate test
cases when new functionalities are introduced to the product line by the product.
      </p>
      <p>
        Driven by the needs of our industrial problem of testing Video Conferencing
Systems (VCSs) product line developed by Cisco, Norway, we proposed Product Line
Model-based Testing Methodologies (PL-MTM) for cost-effective testing of a
product, which mainly includes three activities to tackle the above three problems
respectively. For the Test Selection problem, we proposed an automated and systematic
methodology using Feature Model (FM) and Component Family Model (CFM) to
select a set of relevant test cases for a product from the entire test suite developed for
the product line [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. For the Test Minimization problem, we proposed an automated
approach by defining five cost-effectiveness measures based on the testing
requirements and discussion with test engineers in Cisco and formulating them as a fitness
function. The proposed fitness function was integrated into various search algorithms
(e.g., Genetic Algorithms (GA)) for evaluating their performance in terms of finding
optimal solutions [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4-6</xref>
        ]. For the Test Generation Problem, we proposed a systematic
modeling methodology based on FM, CFM, standard UML class diagrams, UML
state machines, aspect class diagrams, and aspect state machines to automatically
generate executable test case [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This paper presents PL-MTM in detail.
      </p>
      <p>
        To our knowledge, few of the existing works studied test selection, test
minimization and test generation together using FM. In our context, we employed FM and
CFM in product lines for these testing challenges by: 1) applying FM and CFM for
automated selection of test cases; 2) minimizing the obtained test suite based on
various cost/effectiveness measures using search algorithms; and 3) applying FM and
CFM to automatically select and configure behavioral models for model-based test
case generation (More related work can be consulted in [
        <xref ref-type="bibr" rid="ref2 ref3 ref4 ref5 ref6 ref7">2-7</xref>
        ]).
2
      </p>
      <p>Product Line Model-based Testing Methodologies (PL-MTM)
In this section, we present our PL-MTM in terms of test selection, test generation
and test minimization, respectively.
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Test Selection</title>
      <p>
        Fig. 1 illustrates an overview of our test selection methodology, which aims at
obtaining a set of relevant test cases systematically and automatically. First, based on the
expertise and discussions with test engineers in Cisco, we developed a Feature Model
for Testing (FM_T) to capture the commonalities and variabilities of the product line
using a commercial tool namely Pure::Variants1. Second, a Component Family Model
for Testing (CFM_T) was automatically developed to capture the overall test case
structure in the Test Cases repository using a tool we developed called Import Plugin
and Transformation (IPT) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. By linking CFM_T and FM_T with restrictions (also
built automatically by IPT), test engineers only requires to select a set of features for a
product through Pure::Variants and a set of relevant of test cases will be obtained
automatically. Finally, the obtained test suite can be put into a test execution tool
(developed by Cisco) for testing the product.
      </p>
      <p>
        We evaluated our test selection methodology using the product line of Video
Conferencing Systems developed by Cisco called Saturn and performed test case selection
for its four products. The results showed the effort such as selection can be reduced
significantly (on average 87.5%) as compared with the current manual process [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
2.2
      </p>
    </sec>
    <sec id="sec-3">
      <title>Test Minimization</title>
      <p>
        Through more investigation, we observed there were still redundant test cases existing
in the selected test suite, which required minimization for reducing the cost of testing
(e.g., execution time). But such minimization needs to preserve high effectiveness as
compared with the original test suite, which can be considered as a multi-objective
optimization problem and solved by search algorithms [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Based on that, we
proposed an automated approach by defining five cost/effectiveness measures (e.g., fault
detection capability) and formulating them as a fitness function as shown in Fig. 2 [
        <xref ref-type="bibr" rid="ref4 ref5">4,
5</xref>
        ]. The proposed fitness function was investigated into various search algorithms for
guiding the search, which were implemented based on jMetal (a java library for
multiobjective optimization search algorithms2) and by ourselves (e.g., (1+1) Evolutionary
Algorithm). Using the test cases obtained by the selection methodology (Section 2.1)
and test execution information from the repository Test Execution History (e.g., fault
      </p>
      <sec id="sec-3-1">
        <title>2http://jmetal.sourceforge.net/</title>
        <p>detection capability), a solution/search space can be encoded, which includes a large
number of potential solutions, and our goal is to find the optimal solution from such
space using search algorithms included by our tool called TEst Minimization using
Search Algorithms (TEMSA), which was developed using Java Sencha ExtJS (a
JavaScript Framework for Rich Web Apps3). By TEMSA, the minimized test suite is
obtained and further given as an input to the test execution tool for testing the System
Under Testing (SUT). Finally, the test execution information for the test cases will be
returned back to the repository Test Execution History and update the related test data
(e.g., fault detection capability). Notice that the SUT system may interact with other
systems during the test case execution.</p>
        <p>
          The proposed cost/effectiveness measures and fitness function were evaluated in
conjunction with various search algorithms using the Cisco industrial case study, five
case studies from SPLOT4 and 500 artificial problem of varying complexity [
          <xref ref-type="bibr" rid="ref4 ref5 ref6">4-6</xref>
          ].
The results showed that (1+1) EA combined with Path-oriented Random Testing
(PRT) weight strategy achieved the best performance (on average 47% test
minimization with 84% feature pairwise coverage and 91% fault detection capability) [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
2.3
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Test Generation</title>
      <p>
        It is well known that major effort to apply MBT in practice is to develop models for
SUT systems in order to generate test cases [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In our previous work [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], four types
of variability for a product line were captured using standard UML class diagrams,
UML state machine diagrams, aspect class diagrams and aspect state machines, which
were developed by a commercial tool called IBM Rational Software Architect (RSA).
All these models are stored in a repository Behavioral Models and used for test case
generation after configuring them for each new product (Fig. 3). However, using such
models for generation, test engineers are required to be familiar with concepts of all
the behavioral models (e.g., UML class diagram). To ease the adoption of MBT in
      </p>
      <sec id="sec-4-1">
        <title>3 http://www.sencha.com/products/extjs</title>
      </sec>
      <sec id="sec-4-2">
        <title>4 http://www.splot-research.org/</title>
        <p>
          practice, we proposed a test generation methodology using FM and CFM to shield test
engineers from all the above modeling expertise as shown in Fig. 3 [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>
          More specifically, we first reused the same FM_T (Section 2.1) to capture the
commonalities and variabilities of a product line. Second, a Component Family
Model for Behaviors (CFM_B) is developed to associate the behavioral models in the
repository from system information (e.g., API information and system states). Notice
CFM_B can be built automatically using a tool we developed namely Import Plugin
and Transformation for Behaviors (IPTB). By linking CFM_B and FM_T via
restrictions, test engineers are only required to perform selection and configure related
parameters in FM_T and all relevant behavioral models will be selected and
configured automatically. Finally, the configured models will be given as in input to a tool
called TRansformation-based tool for Uml-baSed Testing (TRUST) for generating
executable test cases used to test the SUT system through the test execution tool [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>
          The test generation methodology was also applied to the Saturn product line and its
four products. The results showed the complexity of configuration can be reduced
significantly (on average 66.7% modeling effort is reduced as compared with [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Benavides</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Segura</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Cortés</surname>
            ,
            <given-names>A. R.</given-names>
          </string-name>
          :
          <article-title>Automated analysis of feature models 20 years later. A literature review</article-title>
          .
          <source>Information Systems (35)</source>
          , pp.
          <fpage>615</fpage>
          -
          <lpage>636</lpage>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gotlieb</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Liaaen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <source>Automated Selection of Test Cases using Feature Model: An Industrial Case Study. In Proceedings of the ACM International Conference of Model-Driven Engineering Languages and Systems (MODELS)</source>
          , pp.
          <fpage>237</fpage>
          -
          <lpage>253</lpage>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gotlieb</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liaaen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Briand</surname>
            ,
            <given-names>L.C.</given-names>
          </string-name>
          :
          <article-title>Automatic Selection of Test Execution Plans from a Video Conference System Product Line</article-title>
          .
          <source>In Proceedings of the MODELS Workshop VARiability for You (VARY' 12)</source>
          , pp.
          <fpage>32</fpage>
          -
          <lpage>37</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Gotlieb</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <source>Automated Search-Based Test Suite Minimization in Product Lines: An Empirical Study. Technical Report (2012-28)</source>
          , Simula Research Laboratory,
          <year>2013</year>
          . (https://simula.no/publications/TR2012-28).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Gotlieb</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Minimizing Test Suites in Software Product Lines Using Weighted-based Genetic Algorithms</article-title>
          .
          <source>In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO)</source>
          , pp.
          <fpage>1493</fpage>
          -
          <lpage>1500</lpage>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Gotlieb</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Empirically Evaluating Three Weight Strategies with Search Algorithms for Product Line Test Minimization</article-title>
          .
          <source>Technical Report (2013-01)</source>
          , Simula Research Laboratory,
          <year>2013</year>
          . (https://simula.no/publications/TR2013-01).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yue</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Liaaen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Using Feature Model to Support Model-Based Testing of Product Lines: An Industrial Case Study</article-title>
          .
          <source>In Proceedings of the International Conference of Quality Software (QSIC)</source>
          , pp.
          <fpage>75</fpage>
          -
          <lpage>84</lpage>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yue</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Briand</surname>
            ,
            <given-names>L.C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Walawege</surname>
            ,
            <given-names>S:</given-names>
          </string-name>
          <article-title>A product line modeling and configuration methodology to support model-based testing: an industrial case study</article-title>
          .
          <source>In Proceedings of the ACM International Conference Model Driven Engineering Languages and Systems (MODELS)</source>
          , pp.
          <fpage>726</fpage>
          -
          <lpage>742</lpage>
          .
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>