Arunkumar Khannur's Software Testing Knowledge Center

6.6. Design Specification Techniques

The Test Design Specification techniques or testing techniques are:
  • Code-based Test Design Specification (White-Box Technique): This is a category of Test case design methods that uses the control structure of the procedural design to derive test cases. The following chapter details the approach, Techniques and strategies which are used.
  • Requirement-based Test Design Specification (Black-Box Technique): This method focuses on the functional requirements of the system. The following chapter details the approach, Techniques and strategies which are used to arrive at this.
  • Automated Test Design Specification (Automated Test Techniques): This method specifies the requirement specification which details the automated tests and related activities which are called for the system testing.

The detailed explanation of test case design for first two of these types is considered in separate chapters. Automated Test Design Specification is not part of this book.

In Requirement-based (Functional or Black box Testing), partitioning of inputs is based on module’s specification and emphasis is on testing what the module is supposed to do (that is, functionality). As such, black box testing will not look into details on how well the requirements are being implemented.

On the other hand, Code-based (Structural or White box or Glass box) Test Design Specification, partitioning of inputs is based on module’s implementation and this type of tests focus on how well the requirements are being implemented.

In summary, Requirement-based Testing is focusing on functionality and Code-based Testing looks into implementation. White box and Black box Testing together make testing effective. We shall maintain the test cases separately based on whether specification changes or implementation. In changes in specification take place then we have to test with black box test cases. If implementation changes take place then we have to test with white box test cases.

6.6.1. Code-based Testing
Code-based (White Box or Structural) Testing is a code level testing that provides good insights into the goodness of code against coding standards, logic, programming style, and complexity of code. Studies have indicated that by concentrating more on structural testing, one can ensure reduced rework, quicker stability, and smooth acceptance. In the entire exercise of White Box or Structural Testing, the structure of the software itself is a valuable source of information for selecting test cases and determining whether a set of test cases has been sufficiently thorough. Structural information should not be used as the primary answer to the question, “How shall I choose tests,” but it is useful in combination with other test selection criteria (particularly specification-based testing) to help answer the question “What additional test cases are needed to reveal bugs that may not become apparent through black-box testing alone.” Testing can reveal a bug only when the execution of the corresponding buggy element causes a failure. Unfortunately, a set of correct program executions in which all control flow elements are exercised does not guarantee the absence of bugs.

Basic Path Testing or Control flow testing criteria are defined for particular classes of elements by requiring the execution of all such elements of the program. Control flow elements include statements, branches, conditions, and paths.

Control Flow Testing (Basic Path Testing)
  • Statements
  • Branches or Edge
  • Conditions, and
  • Paths

Cyclomatic Complexity
The degree of control flow coverage achieved during testing is often used as an indicator of progress and can be used as a criterion of completion of the testing activity.

In addition, we have following Static Testing of Code:
  • Static Testing
    • Code Inspection
    • Code Walkthrough
    • Code Review
    • Code Audit
Also, Testing of Data in the code:Also, Testing of Data in the code:
  • Data to check selection of appropriate and proper data types for the specified usage

6.6.2. Black Box testing (Functional Testing)
Basic Requirement based Testing
  • Equivalent Partitioning
  • Boundary Value Analysis
  • Input/output domain testing
  • Comparison Testing

Advanced Requirement based Testing
  • Decision Table based testing
  • State transition diagram based testing
  • Use Case based testing
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
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
Skype: arun.isqt