Page - 150 - in The Future of Software Quality Assurance
Image of the Page - 150 -
Text of the Page - 150 -
150 A. L.Smith
increases. This might be because you are just starting to apply format test design
techniques,or it mightbebecauseyouare focusing toomuchonone technique.
Mutation testing information can help you prioritize resources to maximize test
coverageinnewways.
3 CodeCoverage and Mutation Operators
On the one hand, mutation testing is a black-box testing technique, as the design
and execution of the tests do not require knowledge of the inner workings of the
code. That said, the mutation operators and the fault injection process must have
very detailed knowledge of the code, or at least, a mutable derivation of it. In fact,
the set of mutants generated is inextricably linked to the language and structure of
theunderlyingcode,but thenagainsoare real faults.
When themutation“operator”injects faults into thecode, it performsrule-based
changes, which can usually be customized by the engineers working on the code.
Someexampleof these include:
• Deletingstatements fromthe code
• Insertingstatements fromcode
• Alteringconditions incode
• Replacingvariablevalues
Let’s go over some basic programmingconcepts, and how they link to faults, code
coverage and mutation testing. In most programming languages, an executable
statementexpressesanactiontobecarriedout,suchasassigningavalue,e.g. trueor
false, to a variable. The ISTQB glossary defines this as: “A statement which, when
compiled, is translated into object code, and which will be executed procedurally
when the programis runningandmayperformanactionondata.”
For example, in the code below, the statements all of the lines that don’t start
IF/ELSEarestatements:
Pseudo Code
allowEntrance = false
if (customerHasMembershipCard or customerHasAccessCard):
allowEntrance = true
price = 0
else:
if(weekend):
allowEntrance = true
price = 10
back to the
book The Future of Software Quality Assurance"
The Future of Software Quality Assurance
- Title
- The Future of Software Quality Assurance
- Author
- Stephan Goericke
- Publisher
- Springer Nature Switzerland AG
- Location
- Cham
- Date
- 2020
- Language
- English
- License
- CC BY 4.0
- ISBN
- 978-3-030-29509-7
- Size
- 15.5 x 24.1 cm
- Pages
- 276
- Category
- Informatik