MEETING 6
TESTING TECHNIQUES
SOFTWARE TESTING
By : Ajeng Savitri Puspaningrum, M.Kom
OBJECTIVE
• Learning Testing Techniques
Testing
Techniques
4
CLASSIFICATION AND CATEGORIZATION
• Testing techniques—also referred to as methods—
can be classified by their characteristics. Common
classification schemes are by main characteristic of
a test by the target of testing (e.g. GUI or
integration) and by the available information
• There are three main classes of testing techniques:
• Static testing
• Dynamic testing
• Exhaustive testing
5
CATEGORIZATION
OF TESTING
TECHNIQUES
6
STATIC TECHNIQUES
• Static techniques consider the program
at a given point, usually without
executing it.
• This technique does not create test
cases since there is no execution of the
program to be tested
• There are two type of static technique :
• Verification
• Static analysis
7
VERIFICATION
• Verification techniques aim at formally checking
a program against its specification.
• Formal techniques
• Based on the specification of the program, consistency of
the program and its specification is proven
• An exhaustive specification is required and it has to be
transferred to a formal specification.
• Symbolic tests
• Variables in the program are treated as logic variables
instead of parameterizing them with constant values
• Combinations of input parameters and expected output
can be used as test cases
8
STATIC ANALYSIS
• Static analysis does not execute the program under
consideration and does not necessarily require tool
support
• Style analysis
• A technique that checks source code for its compliance
with predefined conventions.
• Slicing
• Used to automatically discover interrelations within
programs, for examples with regard to the influence of
statements on variables
• Control flow analysis
• Used to detect code that cannot be executed for semantic
reasons (dead code) and loops that cannot be left once
entered
9
STATIC ANALYSIS(CONT…)
• Data flow (anomaly) analysis
• Used to detect parts of programs that deviate from the
expectation
• Software inspections and code reviews
• An extensive field with a number of techniques to manually
assess the source code.
• Not only defects are searched for, but reviewers assess
whether the desired level of quality has been reached and
whether conventions are fulfilled
• Metrics
• Used to assess a program’s quality, to handle complexity, to
control the development process, and to check if standards
are met
• Useful to estimate effort, costs, and duration, to proactively
identify problems, for reasons of comparison, and to judge
the effectivity of newly introduced tools and methods
10
DYNAMIC TECHNIQUES
• Dynamic techniques are based on executing
the code in order to detect failures
• This techniques divided by their orientation
on a program’s structure or functions, as
follow :
• Structure Oriented
• Function Oriented
• Dynamic Analysis
• Performance Tests
• Experience Based
• Further Techniques
11
STRUCTURE ORIENTED
• A program is tested against its own code
which is forcing testers to check the code in
detail.
• Control flow testing
• Used to cover each path through a program by built a
control flow graph (CFG)
• Data flow testing
• Conducting by used information on how data is
processed by a program which is checked when
variables are read and written
12
FUNCTION ORIENTED
• To test a program’s functions, cause and effects of it
• Should not be conducted by the developers that
implemented them
• Function coverage
• Used to cover each function with one test case
• Use case oriented
• For each use case, as many test cases have to be created as are
required to cover each corresponding path at least once
• Decision tables
• Summarize rules in clearly arranged tables which is made up of
conditions and actions.
• Used for cause effect analyses that try to decrease the number of
required test cases
13
FUNCTION ORIENTED(CONT…)
• Equivalence partitioning and boundary value
• In Equivalence partitioning (also called input testing), test cases align with
classes that are to be tested both in a macro and in a micro perspective
• Boundary values analysis is using numeric values (in particular intervals)
whereas equivalence partitioning only uses textual or property values
• Domain testing
• Used to check equivalence classes’ boundaries and reduce the number of
test cases required to test all (remaining) classes
• Partition analysis
• An approach that combines different ideas, namely verification and
testing which uses symbolic execution and defines three criteria for
comparing specification and implementation of a program: compatibility,
equivalence, and isomorphism
• State oriented testing
• A technique that takes the idea of structured testing to black-box tests
• To cover each transition between states at least once.
14
DYNAMIC ANALYSIS
• Reveal defects that are almost impossible to find
with other techniques and can be used to
visualize a program’s performance and to deduce
runtime information.
• Finding Memory Leaks
• describe a conditions in which programs continuously
allocate more memory than they need and not completely
deallocated after not being needed any more
• Finding Performance Bottlenecks
• Used for test software that consists of multiple large
modules or that has sophisticated algorithms
• Dynamic Symbolic Execution
• The basic principles are the same as symbolic tests but in
place of statically checking the code, it is executed
15
PERFORMANCE TESTS
• Also be called efficiency tests, are used to assess the
runtime behavior with regard to resource utilization
and response times.
• Conducted to ensure that a program will work under
unforeseeable future conditions
• Load test/Volume Test
• Used to assess a program’s behavior under load (the sum of
inputs to the program, resembles the typical workload that is
estimated for the program)
• Stress test
• Programs are tested with loads that are beyond the expected
workload even beyond the maximum noted in the specification
in order to fathom how the program behaves under such
workloads
16
EXPERIENCE BASED
• Also called free testing techniques, are not rely on a
structured approach but utilize a tester’s experience
and high testing skills in order to test effectively
• Intuitive Testing
• Testers have in mind where defects might be or what might cause
failures (error hypotheses)
• Explorative Testing
• Attacks are used to check whether a program is prone to common
problems and often is used for security testing
17
FURTHER TECHNIQUES
• Back-to-back tests
• Especially used for embedded systems, the programs are
run and their outputs are compared
• Mutation tests
• Do not mean to test a program but the tests written for
this program, attributed to fault-based testing
• Statistic Testing
• Based on probability distributions of the usage of classes,
methods, or other program components
• Tests are generated and their contribution to covering
classes, methods, or other program components is
assessed.
“ YOU’RE NEVER DONE
TESTING !
The burden simply shifts
from you (the software engineer) to the end user
18
19
KIND OF TESTING
• Conventional Software Testing
• White-box testing
• Basis path testing
• Control Structure Testing
• Black-box testing
• Object Oriented Software Testing
• Class level testing
• Inter class testing
*will be disscuss next meeting
References
Lewis, W. E. (2009). Software Testing And Continuous Quality
Improvement ed. 3rd. Auerbach publications.
02
Majchrzak, T. A. (2012). Improving Software Testing: Technical And
Organizational Developments. Springer Science & Business Media.
03
Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software
Testing. John Wiley & Sons.
04
Roger, S. P., & Bruce, R. M. (2019). Software Engineering: A
Practitioner’s Approach Ed.9th. McGraw-Hill Education.
01
THANK YOU
Insert the Subtitle of Your Presentation

Testing Technique

  • 1.
    MEETING 6 TESTING TECHNIQUES SOFTWARETESTING By : Ajeng Savitri Puspaningrum, M.Kom
  • 2.
  • 3.
  • 4.
    4 CLASSIFICATION AND CATEGORIZATION •Testing techniques—also referred to as methods— can be classified by their characteristics. Common classification schemes are by main characteristic of a test by the target of testing (e.g. GUI or integration) and by the available information • There are three main classes of testing techniques: • Static testing • Dynamic testing • Exhaustive testing
  • 5.
  • 6.
    6 STATIC TECHNIQUES • Statictechniques consider the program at a given point, usually without executing it. • This technique does not create test cases since there is no execution of the program to be tested • There are two type of static technique : • Verification • Static analysis
  • 7.
    7 VERIFICATION • Verification techniquesaim at formally checking a program against its specification. • Formal techniques • Based on the specification of the program, consistency of the program and its specification is proven • An exhaustive specification is required and it has to be transferred to a formal specification. • Symbolic tests • Variables in the program are treated as logic variables instead of parameterizing them with constant values • Combinations of input parameters and expected output can be used as test cases
  • 8.
    8 STATIC ANALYSIS • Staticanalysis does not execute the program under consideration and does not necessarily require tool support • Style analysis • A technique that checks source code for its compliance with predefined conventions. • Slicing • Used to automatically discover interrelations within programs, for examples with regard to the influence of statements on variables • Control flow analysis • Used to detect code that cannot be executed for semantic reasons (dead code) and loops that cannot be left once entered
  • 9.
    9 STATIC ANALYSIS(CONT…) • Dataflow (anomaly) analysis • Used to detect parts of programs that deviate from the expectation • Software inspections and code reviews • An extensive field with a number of techniques to manually assess the source code. • Not only defects are searched for, but reviewers assess whether the desired level of quality has been reached and whether conventions are fulfilled • Metrics • Used to assess a program’s quality, to handle complexity, to control the development process, and to check if standards are met • Useful to estimate effort, costs, and duration, to proactively identify problems, for reasons of comparison, and to judge the effectivity of newly introduced tools and methods
  • 10.
    10 DYNAMIC TECHNIQUES • Dynamictechniques are based on executing the code in order to detect failures • This techniques divided by their orientation on a program’s structure or functions, as follow : • Structure Oriented • Function Oriented • Dynamic Analysis • Performance Tests • Experience Based • Further Techniques
  • 11.
    11 STRUCTURE ORIENTED • Aprogram is tested against its own code which is forcing testers to check the code in detail. • Control flow testing • Used to cover each path through a program by built a control flow graph (CFG) • Data flow testing • Conducting by used information on how data is processed by a program which is checked when variables are read and written
  • 12.
    12 FUNCTION ORIENTED • Totest a program’s functions, cause and effects of it • Should not be conducted by the developers that implemented them • Function coverage • Used to cover each function with one test case • Use case oriented • For each use case, as many test cases have to be created as are required to cover each corresponding path at least once • Decision tables • Summarize rules in clearly arranged tables which is made up of conditions and actions. • Used for cause effect analyses that try to decrease the number of required test cases
  • 13.
    13 FUNCTION ORIENTED(CONT…) • Equivalencepartitioning and boundary value • In Equivalence partitioning (also called input testing), test cases align with classes that are to be tested both in a macro and in a micro perspective • Boundary values analysis is using numeric values (in particular intervals) whereas equivalence partitioning only uses textual or property values • Domain testing • Used to check equivalence classes’ boundaries and reduce the number of test cases required to test all (remaining) classes • Partition analysis • An approach that combines different ideas, namely verification and testing which uses symbolic execution and defines three criteria for comparing specification and implementation of a program: compatibility, equivalence, and isomorphism • State oriented testing • A technique that takes the idea of structured testing to black-box tests • To cover each transition between states at least once.
  • 14.
    14 DYNAMIC ANALYSIS • Revealdefects that are almost impossible to find with other techniques and can be used to visualize a program’s performance and to deduce runtime information. • Finding Memory Leaks • describe a conditions in which programs continuously allocate more memory than they need and not completely deallocated after not being needed any more • Finding Performance Bottlenecks • Used for test software that consists of multiple large modules or that has sophisticated algorithms • Dynamic Symbolic Execution • The basic principles are the same as symbolic tests but in place of statically checking the code, it is executed
  • 15.
    15 PERFORMANCE TESTS • Alsobe called efficiency tests, are used to assess the runtime behavior with regard to resource utilization and response times. • Conducted to ensure that a program will work under unforeseeable future conditions • Load test/Volume Test • Used to assess a program’s behavior under load (the sum of inputs to the program, resembles the typical workload that is estimated for the program) • Stress test • Programs are tested with loads that are beyond the expected workload even beyond the maximum noted in the specification in order to fathom how the program behaves under such workloads
  • 16.
    16 EXPERIENCE BASED • Alsocalled free testing techniques, are not rely on a structured approach but utilize a tester’s experience and high testing skills in order to test effectively • Intuitive Testing • Testers have in mind where defects might be or what might cause failures (error hypotheses) • Explorative Testing • Attacks are used to check whether a program is prone to common problems and often is used for security testing
  • 17.
    17 FURTHER TECHNIQUES • Back-to-backtests • Especially used for embedded systems, the programs are run and their outputs are compared • Mutation tests • Do not mean to test a program but the tests written for this program, attributed to fault-based testing • Statistic Testing • Based on probability distributions of the usage of classes, methods, or other program components • Tests are generated and their contribution to covering classes, methods, or other program components is assessed.
  • 18.
    “ YOU’RE NEVERDONE TESTING ! The burden simply shifts from you (the software engineer) to the end user 18
  • 19.
    19 KIND OF TESTING •Conventional Software Testing • White-box testing • Basis path testing • Control Structure Testing • Black-box testing • Object Oriented Software Testing • Class level testing • Inter class testing *will be disscuss next meeting
  • 20.
    References Lewis, W. E.(2009). Software Testing And Continuous Quality Improvement ed. 3rd. Auerbach publications. 02 Majchrzak, T. A. (2012). Improving Software Testing: Technical And Organizational Developments. Springer Science & Business Media. 03 Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software Testing. John Wiley & Sons. 04 Roger, S. P., & Bruce, R. M. (2019). Software Engineering: A Practitioner’s Approach Ed.9th. McGraw-Hill Education. 01
  • 21.
    THANK YOU Insert theSubtitle of Your Presentation