Arunkumar Khannur's Software Testing Knowledge Center
   
 

7.2. Purpose of Code-based Testing

The purpose of Code-based Testing is to test the code to check whether it is syntactically and semantically correct. It involves:

  • Understand the objective to arrive at test cases
  • Effective conversion of specification into code
  • Checking programming style and compliance with coding standards
  • Check Logic errors and incorrect assumptions introduced when coding.
  • Find incorrect assumptions about execution of paths
  • Find typographical errors

To achieve this, the software engineer can derive test cases that
Guarantee that code conforms with standards-
  • Coding standards
  • Programming style
  • Code is syntactically correct
  • Code is semantically correct
  • Code is mathematically and logically correct
  • Code is well structured so that its complexity is manageable

Guarantee that all independent paths within a module have been exercised at least once
  • Exercise all logical decisions on their true and false sides
  • Execute all loops at their boundaries and within their operational bounds
  • Exercise internal data structures to assure their validity
  • Code follows single entry and single exit condition

In order to achieve this, software engineer and testers require coding standards, programming style, checklist like code walk-through or code inspection checklist; may have to maintain traceability matrix; also, tester records his findings in bug report as well as in review records. In the following sections, we discuss in detail about each type of Code-based Test Case Design techniques.
 
 
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