Examining the Code Static WhileBox Testing Code Static
Examining the Code
Static While-Box Testing : ������� ��� Code Static While-Box Testing : is the process of carefully and Methodically reviewing the software design , architecture or Code for bugs without executing it. It’s sometimes referred to as structural analysis
Reason ����� to find bugs early and to find bugs that would be difficult to uncover or isolate with dynamic black-box testing. ���������������� black-box �� test cases ������� Software
Who: Programmer who organize and run the reviews. Software tester �������� Other - Designer
Formal Reviews : is the process under which static white -box testing is performed. can range from a simple meeting bet. programmers to detailed, rigorous inspection of the Code.
There are 4 essential elements to a formal review : . 1 Identify Problem find problem with SW directed at the code �������� (Not ���� ) 2. Follow Rules Set the amount of code to reviewed (�������� ) How much time will be spent. What can be commented.
. 3 Prepare ����� tester ����������� Review ������� tester ��������������������� Review. 4 Write a Report: How many problems were found, Where they were found.
Finding Problems inderect result • Communications • Quality • Team Camaraderie : to build respect for each other’s skills and to better understand each other’s jobs and job needs • Solutions
Generic Code Review Checklist Data Reference Errors ���� Bugs ������ Variable, constant, array, string ��������� Is an uninitialized Variable referenced ? ������ array subscripts ��� string dimension • ������������ array • ����������� •
Data Declaration Errors • Variables • Constants ������ correct length, type ��� storage class - array of string - array of character ������ ��������� Bugs ��������� ���������� - Local Variable - Global Variable
Comparison Errors < , > , = , <= , >= , true , false • �������������� 1. 0000001 ��� 1. 0000002 • ������ Boolean expression
Control flow error There are usually cause direct / indirect. • ������� • ��� terminate of loop • premature exit or loop never executes
Input / Output Errors any data related to reading from file �������� keyboard ����� format �������� data ������� External Device ������� ? SW ������� Data
Foundamental testing techniques Static black box ( testing the specification ) 2. Dynamic black box ( testing the software ) 3. Static White box ( Examining the code ) 4. Dynamic White box ( X-ray specification ) ( structural testing ) 1.
Testing the software with X-ray glasses Dynamic White-Box testing Should tell you exactly what material it covers. It runs program, • Look inside the box • Examming the code • Watch it as it runs �������� What the code does How its work
Dynamic White-box testing ���� 4 ���� 1. low-level functions, procedure, subroutines, libraries 2. Top level completed program test base on operation ��� Tester ��� 3. Access to read variables and state information from SW 4. ������� Code
Dynamic White-Box Testing Debugging Dynamic White box testing Isolating The bug Debugging Testing Programming Goal is To find Bugs To fix them
- Slides: 18