with the first unselected mutant of the first post-n
node, the second with the first unselected of the first
of the pre-n node etc. The process continues until all
mutants of node n have been used at least once and
one mutant from every pre-n and post-n nodes has
also been selected. The strategy DomDiff selects the
mutants in a similar fashion with an additional
restriction of selecting mutants produced by different
mutation operators only.
The Relaxed Dominator category selects mutant
pairs with the same scheme with the Dominator
strategy but in a relaxed way. That is, without
requiring the selection of at least one mutant from
every pre-n and post-n nodes. Thus, the strategies of
this category select one mutant pair for each mutant
belonging to node n and use each mutant as few
times as possible. This means that node pairs shown
in Figure 1, will be generated only if both their
nodes have unused mutants. In a different case the
next available pair that meets the above requirement
will be used.
The strategies RDomF and RDomDiff are the
relaxed versions of the DomF and DomDiff
strategies respectively.
The Strict Dominator category restricts the
selection of mutants among dominated node pairs.
That way it is expected that both or none of the
mutants will be executed by the test cases. The
developed strategies SDomF, SDomDiff use the
same selection approach applied only on the
dominated node sets as described above. It has been
found that by using such a technique many mutants
remain unused as they refer to nodes not being
dominated. For these mutants the appropriate
relaxed dominator strategy has also been used, i.e. if
the SDomF strategy is applied then the unused
mutants will be combined with the RDomF strategy.
4 EXPERIMENT
In the present study we investigated the
effectiveness of various second order strategies and
weak mutation as opposed to strong mutation.
Furthermore the ability of fulfilling strong mutation
while aiming at second order on the one hand and
also similarly when aiming at weak mutation on the
other is analysed.
For the purposes of the experiment a set of 15
Java program test units was used, which were
chosen from those used in (Papadakis et al., 2010)
and (Polo et al., 2009) and an automated framework
was implemented for producing second order and
weak mutation mutants for java. The framework
uses the mujava mutation testing tool (Ma et al.,
2005) for the generation of first order mutants. The
experiment was initiated by independently applying
each one of the second order and weak mutation
testing strategies on all test subjects. Then a
comparison was made based on strong mutation,
which was done by recording the collateral strong
mutation score achieved by the constructed test sets
per each strategy. To eliminate any bias introduced
by a particular test case set, we generated 10
separate test sets for each unit and for each variant.
5 RESULTS
The conducted study tries to unveil details about the
benefits of either using second order mutation
testing strategies or weak mutation instead of strong
mutation.
Table 1 summarizes the achieved equivalent
mutant reduction for all considered strategies (table
columns) and selected units with respect to strong
mutation. The most interesting aspect of this table is
that both second order and weak mutation testing
strategies produce by far less equivalent mutants
than what strong mutation does. The strong mutation
collateral scores for the produced tests of the
considered strategies are shown in Figure 2. It is
obvious that strict category strategies are more
effective than the Dom and RDom strategies.
Additionally, it can be observed that strategies based
on different operators are less effective but as they
produce less equivalent mutants (Table 1) they may
be a good choice.
Conclusively, the experiment suggests that
considerable savings can be achieved by both second
order and weak mutation strategies as opposed to
strong mutation. Weak mutation achieves on average
a score of 97.05% thus, recording approximately an
effectiveness loss of 3% with an achieved reduction
of 27.03% of equivalent mutants (reducing their
number by 73%). This being a very important
observation as it indicates that a 73% less manual
effort (equivalent mutant identification) can be
gained. According to the SDomF strategy a similar
conclusion can be argued as 3.5% of effectiveness
loss, the gain of less equivalent mutants rises to
87%. These results suggest that it is possible to
perform mutation with reasonable resources.
MUTATION TESTING STRATEGIES - A Collateral Approach
327