Dynamic Testing Techniques


  • Dynamic testing is a method to access the use of a software program by giving input and examining the output.
  • This technique is used to detect defects and to determine quality attributes of the code.
  • Dynamic testing is completed in validation process.
Subcategories of Dynamic testing techniques

dynamic testing techniques

1) Specification-Based Testing Technique

  • Specification-based testing technique is called as Black Box or Input/Output driven Testing Technique. It is because the testers view the software as black-box with inputs and output.
  • Functional and non-functional testing are the types of specification based testing.
  • Specification based technique is applicable at all the levels of testing.
  • Specification based test design techniques use the specification of the program.
  • Specification can be anything such as written document, collection of use cases, a set of modules or a prototype.
Following are the types of specification Based testing techniques:

i) Equivalence Partitioning
ii) Boundary Value Analysis
iii) Decision Tables
iv) State Transition

pecification types

i) Equivalence Partitioning

  • In equivalence partitioning, software testing technique divides the input data of a software unit into the partitions of equivalent data and test cases are derived from the partitions of equivalent data.
  • Equivalence Partitioning is applied at any level of testing.
  • The software treats all the conditions in one partition as the same. Hence, equivalence partitioning needs to check only one condition from each partition.
  • Since, all the condition in one partition are same, if one condition in partition works then we can assume that all the conditions in that partition work or otherwise.

ii) Boundary Value Analysis

  • Boundary Value Analysis is the test case design technique to test boundary value between partitions.
  • Boundary value is an input or value on the border of an equivalence partition.
  • It consists of start-end, lower-upper, maximum-minimum on inside and outside boundaries.
  • Boundary Value Analysis (BVA) checks the boundary values of Equivalence Class Partitioning(ECP), hence BVA comes after ECP.
  • For example, A tool consists of user name and password field. It accesses minimum 6 and maximum 10 characters to work with this tool. Valid range is 6-10 characters, Invalid range is 5 or less than 5 characters and more than 10 characters.
boundary value analysis

iii) Decision Tables

  • Decision table testing is a combination of inputs that generates various outputs. It is also known as Cause-Effect table.
  • It gives a standard way to test complicated business rules that are useful for testers and developers.
  • The first task is to recognize a suitable function that behaves according to the combination of inputs.
  • If the system contains many inputs then combination becomes unmanageable.

iv) State Transition Testing

  • The system can be in a limited number of various states and the transitions from one state to another. It is determined by the rules of the “machine”.  This is the model based on the system and the tests.
  • The model is more elaborated as we require the advantage of the state transition technique.
Following are the basic parts of the state transition model:

  • The state of the software could be start, open, close, exit etc.
  • The transition from one state to another is allowed but not compulsory.
  • An event causes a transition like closing a file or withdrawing money etc.
  • The action results from a transition i.e an error message or access the cash.
  • For example, State transition diagram for ATM machine.
state transition model

2) Structure-Based Testing Techniques

  • Structure based technique is called as White box testing or Glass box testing.
  • Using structured based technique, we produce additional test cases which are different from existing tests.
  • Structure based testing assists two purposes i.e test coverage measurement and structural test case design.
  • The test cases derived in specification based techniques are used to access coverage of testing in above purposes.
  • These are used to design more tests with the goal of increasing the test coverage.
  • Test coverage measures the amount of testing executed by a set of test.

  • coverage formula

  • The hazard of coverage measure is that 100 % coverage does not mean 100 % tested.
  • From the view of multi dimensional concept, coverage technique measures only one dimension.
  • There is a possibility that two distinct test cases execute exactly same coverage. But, there is a possibility that input data of one detects an error while that of another does not find an error.
Advantages of code coverage measurement

  • Code coverage measurement produces more test cases to increase coverage.
  • It helps to find area of a program which is not utilized by a set of test cases.
  • It helps in determining a significant measure of code coverage that indirectly measures the quality of an application or product.

Coverage measure

The coverage measurement of code is completed by using tools. Many tools are available for this task.

These tools helps for following tasks:

  • It helps to improve the quality and productivity of testing.
  • The quality improves to verify more structural aspects that are tested. This helps to find the defects on those structural path.
  • It helps in testing the same structure with different data.

Types of coverage

  • There are many types of test coverages. The Test coverage is used at all levels of testing.
  • The coverage is measured at component level testing, integration level of testing or acceptance level of testing.
  • On the basis of a number of various structural elements in the system or component the coverage can be measured.
Following are the types of Code Coverage:

i) Statement coverage
ii) Decision coverage
iii) Condition coverage

code coverage types

i) Statement coverage

  • Statement coverage is called as line coverage or segment coverage.
  • It covers only the true conditions.
  • The executed statement can recognize during the process of statement coverage but the code is not executed because of blockage.
Advantages of Statement Coverage

  • It ensures what the written code  is expected to do and not to do.
  • It measures the quality of written code.
  • It verifies the flow of various paths in the program and also verifies if those path are tested or not.
Disadvantages of Statement Coverage

  • Statement coverage cannot test the false conditions.
  • It does not report if the loop has reached at its termination or not.
  • It does not recognize the logical operators.

ii) Decision coverage

  • Decision coverage is called as branch coverage or all edges coverage.
  • It tests both true and false conditions.
  • A branch is the result of a decision. So, branch coverage measures which decision results were tested.
  • It seems good as it takes a more in-depth view of source code than the simple statement coverage.
  • A decision is an IF statement, a loop control statement i.e DO-WHILE or REPEAT-UNTIL etc. or CASE statement.
  • In these statements two or more result are possible.
  • With an IF statement, the exit can be TRUE or FLASE, depending on the value of the logical condition that comes after IF.
Advantages of Decision Coverage

  • It ensures that all the branches in the code are reached.
  • It removes the problems that occur with statement coverage testing.

iii) Condition coverage

  • Condition coverage is also called as Predicate Coverage.
  • Condition coverage is for boolean expressions. It verifies whether all the boolean expression evaluate to both TRUE and FALSE.
  • This technique needs the coverage of all conditions which determine the decision result.

3) Experience-Based Testing Technique

  • Experience-Based testing technique requires testers to possess knowledge, skills and background. These are important to test conditions and test cases.
  • The experience people in both technical and business are needed, because they bring various aspects to test, analysis and design process as well as they may have an idea about which is the best way for testing and what is going wrong.
  • This technique is used with specification-based and structured based techniques and also used when there is no specialization or the specification is out of date.
  • This technique is used for low-risk system.
Types of Experience Based Testing Technique

i) Error guessing
ii) Exploratory testing

experience based testing technique

i) Error guessing

  • In error guessing, experienced and good testers are required to recognize the defects in the component.
  • The experienced testers are able to find weaknesses of a system. So, the error guessing approach is used after more formal techniques and it is effective.
  • The assumption and guesses are constructed by the experienced testers. Hence it saves time in error guessing.
  • The success of Error Guessing technique is absolutely dependent on the skills and experience of the tester.

ii) Exploratory testing

  • Exploratory testing examines or explores the software. It finds out if software works or not.
  • The testers continuously make decisions about what to test next and where to spend time. This approach is useful when there is limited time and poor specifications are available.
  • In exploratory testing, testers are involved in minimum planning and maximum test execution.
  • This testing is used to check formal test process i.e. planning, test design, test execution etc. which ensures that most serious defects that are found.

Deciding the test technique

Which testing technique is best for particular project is based on the number of Internal and external factors.

Internal factors

Following internal factors help in deciding which technique should be used for particular project:

i) The model used in the development of system
ii) Tester's knowledge and experience.
iii) Experience with a similar previous system
iv) Objectives of the test
v) Initial documentation of the content and its style.
vi) Use of life cycle model

External factors

Following external factors decide which technique should be used for a particular project:

  • Risk Assessment - If the risk is high then it requires more detailed and formal testing. Commercial risk can be affected by quality issue hence the exploratory testing is suitable.
  • The requirements of customer and commitments in the contract.
  • The type of system used - The type of system i.e embedded, graphical, financial etc. will affect the choice of techniques.
    For example: The financial application consists of a lot of calculations. In this case, boundary value analysis is beneficial.
  • Regulatory requirements - Some of the industries have regulatory standards or guidelines that guide the testing techniques to be used.
  • Time and budget of the project - The available time always affects  the choice of testing techniques. If more time is available then we can select more techniques and if limited time is available then find the most important defects only.