Seite - 156 - in The Future of Software Quality Assurance
Bild der Seite - 156 -
Text der Seite - 156 -
156 A. L.Smith
I askedMarkushowheoptimizesmutation testing to reduceequivalentmutants,
andhe disagreedwith themetric:
This cannot be answered as is, the reality is more difficult. The question implies that
equivalent mutations are a real world problem, but they are not. The question also implies
the toolproducesmutationsof“lowinformationalvalue”andnoteverymutationthatcomes
back alive contains value for the human who reads a report. Both assumptions are false in
my world. Equivalent mutants almost never show up, and lowvalue mutationsdo notexist,
hence everything must be killed.—Markus Schirp
To understandwhatMarkusmeant, let’s lookat anequivalentmutation:
Pseudo Code
def foo(i):
return i + 1 + 0
An example of a potentially equivalent mutant would be to remove the “+ 0”.
While thiswouldchangethesoftwareunder testing, it doesn’tchangetheoutput,as
adding zero to a number has no actual effect anyway. That is exactly the point, the
code is irrelevantandshouldbe removed.
5 Mutation TestingTools
Mutation testing tools are numerous in nature, this is in part, because they are
intrinsically linked with the programming languages used in the implementation.
Youcan’tgenerallyusea tooldesignedforC++withJava. It is crucial topicka tool
thatsupports theunderlyingtechnologystack,hassupport toallowyoutoconfigure
the mutation heuristics you want, integrates with your development environment
well, and supports parallel and distributed execution.Wikipedia [8] has a good list
ofmutationenginesthatyoucanusewithyourcode.Gettingstartedwiththesetools
canbeas simpleas injectinga dependencyintoyourbuildconfiguration.
Selecting and evaluating tools that suit you is actuallymore important than with
traditionaltoolselection.Onereasonisthat thetoolswillcomewithdifferentdefault
operators and strategies built in. As outlined earlier, these operators and strategies
effectively dictate the technical approach and directly affect the results. The tool
also may determinehow you can scale the run-timeexecution, and choosing a tool
with such limitedsupportmayresult in impractical execution timelines.
Tools and libraries also exist for mutating data structures rather than code, for
instance,applyingheuristicoperatorsagainststandarddatastructuressuchasXML.
The Future of Software Quality Assurance
- Titel
- The Future of Software Quality Assurance
- Autor
- Stephan Goericke
- Verlag
- Springer Nature Switzerland AG
- Ort
- Cham
- Datum
- 2020
- Sprache
- englisch
- Lizenz
- CC BY 4.0
- ISBN
- 978-3-030-29509-7
- Abmessungen
- 15.5 x 24.1 cm
- Seiten
- 276
- Kategorie
- Informatik