Arunkumar Khannur's Software Testing Knowledge Center
   
 

7.5. Types of Code-based Testing

In order to test the extent to which code meets correctness and style related properties, code-based testing has to be carried out. Fig. 4.2 represents code development, code inspection, unit testing in software development process.

Code-based testing consists of Dynamic Testing, Cyclomatic Complexity to test whether complexity of code is manageable, and Static Testing.
  • Dynamic or Control Flow based Testing (Basic Path Testing) to verify statement coverage, edge (or branch) coverage, conditional coverage, path coverage
  • Cyclomatic Complexity: Checking for Complexity of Code using techniques like Cyclomatic Complexity
  • Data Testing to check selection of appropriate and proper data types for the specified usage
  • Static Testing
    • Code Inspection
    • Code Walkthrough
    • Code Review
    • Code Audit

Following diagram Fig. 4.3 Types of Code Based Testing

Dynamic Testing detects errors that can be in the program. Here, we write test cases to execute some conditions and parts of the program. Success depends on number of test cases and test coverage. However there is a possibility that all possible paths can not be executed and hence, many paths in program are uncovered and also, errors are undetected.

On the other hand, Static Testing is an analysis based and there is no need to execute the program. Here one needs to analyze the code or representation of program in some form like dependence graph or syntax tree. In static testing, there is no need or notion of writing test cases but analysis of code by review or inspection or walkthrough or review
 

 
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
         
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
STEP-AUTO Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
URL: www.isqtinternational.com
Email: khannur@isqtinternational.com
Skype: arun.isqt