IT 8076 Software Testing UNIT – I Part -3 Dr. S. Roselin Mary, Professor & Head Department of Computer Science and Engineering (NBA Accredited) Anand Institute of Higher Technology, Chennai
Defect Classes : Important – adapt a single classification scheme & apply it to all projects Some defects will fit into more than one class or category – developers, testers & SQA – try to be consistent when recording defect data Defect types & frequency of occurrence guide test planning & test design Execution based testing strategies – strongest possibilities of detecting particular types of defect Tests for new & modified software – designed to detect the most frequently occurring defects Defect classes focusing execution based testing: Requirement/specification defect class - Design defect class - Coding defect class - Testing defect class 12/14/2019 2 Dr.S.Roselin Mary, HOD/CSE
DEFECT CLASSES 12/08/2019 DR.S.ROSELIN MARY, PROFESSOR & HOD/CSE 3
Requirement / specification Defect classes : Defects injected in early phase persist & very tough to remove at later phases Requirement document written in natural language with specification Occurrence of ambiguous, contradictions, unclear, redundant &imprecise requirements Specification document – similar format specification language with tools to prevent incorrect description of system behavior Functional Description defects – overall description of what the system does & how the system should behave is incorrect, ambiguous & incomplete Feature defects feature descriptions – missing, incorrect, incomplete superfluous Distinguishing character of a software component/system Feature Interaction defects incorrect description of how the features should interact Explain the example Interface description defects – defects that occur in the description of how the target software is to interface with external hardware, software & users Blackbox based testing – at unit, integration, system & acceptance levels Feature interaction & Interface description defects – detected using BB test at integration & system level tests 12/14/2019 4 Dr.S.Roselin Mary, HOD/CSE
2. Design defects : Occur when system components, interaction between component to component, component to outside software/hardware are incorrectly designed Covers defects in design of algorithm, control, logic, data elements, module interface description Detailed design description – at pseudo level with processing steps, data structures, input output parameters & control structures Algorithmic & Processing defects: Processing steps – incorrect Calculation – not in order – missing/duplicated Algorithm reuse – chosen an inappropriate algorithm Control, logic & sequence defects Control defects occur when logic flow – incorrect Branching – soon, late, incorrect Unreachable psuedocode , improper nesting, improper procedure calls Incorrect use of logic operators < , >, Boolean expression in branching operation Data defects Incorrect design of data structures Record – lacking a field, incorrect type for variable in record Array – not have proper number of elements assigned Reviews/data dictionary – reveal these defects 12/14/2019 5 Dr.S.Roselin Mary, HOD/CSE
Module Interface description defects Incorrect/inconsistent parameter types Incorrect number of parameters/ ordering of parameters Functional description defects Design maynot properly describe the functionality of a module Incorrect/missing/unclear design elements Detected during design review External Interface description defects Incorrect design descriptions for interfaces external software, database & hardware devices Improper sequence of commands, lack of proper messages & feedback messages 3. Coding defects From errors in implementing the code Closely related to design defect classes Not understanding programming constructs Transcription/omission Algorithmic & Processing defects Unchecked overflow, underflow conditions Comparing inappropriate data types Conversion of datatype Precedence of operators Misuse of parentheses Incorrect use of signs 12/14/2019 6 Dr.S.Roselin Mary, HOD/CSE
Control, logic and sequence defects Case statements , iteration of loops, missing paths Typographical defects –syntax error Initialization defects – omission / incorrect initialization statements Dataflow defects Variable should be initialized before its use Don’t initialize twice before intermediate use Data defects Incorrect implementation of data structures record , array, flags, indices & constant sets Module Interface defects – similar to design defects Code documentation defects Code documentation – doesn’t reflect what the program actually does Incomplete/ ambiguous/incorrect/out of date External hardware, software interface defects System calls, links to database, input output sequences, memeory usage, resource usage, interrupts, protocols & interfaces with build files Design & coding defects – whitebox testing – dataflow, control, logic Blackbox testing – decision tables, Boolean expression 12/14/2019 7 Dr.S.Roselin Mary, HOD/CSE
4. Testing defects Defects in test plan, test cases, test harnesses, procedures Test Hareness defect Test hareness / Scaffolding code – auxiliary code developed to test the software at the unit and integration levels Should be carefully designed & tested – reuse Subject to all other types of defects Test case design/ Test procedure defects Incorrect/incomplete, missing, inappropriate test cases & procedures 12/14/2019 8 Dr.S.Roselin Mary, HOD/CSE