Click here to load reader
Upload
softwarecentral
View
4.576
Download
5
Embed Size (px)
Citation preview
Software Testing
การทดสอบซอฟต์�แวร�
เป็�นการแสดงให้�เห้�นว�า software ท��ท�าขึ้��นมาท�างานได� อย่�างไม�ม�ขึ้�อผิ$ดพลาด และพย่าย่ามแสดงว�า software ทำ��ง�นผิ�ดพล�ด ด�วย่ (เพ(�อจะได�ไป็แก�ไขึ้จ*ดท��ท�าให้�เก$ดขึ้�อผิ$ดพลาดน+�น)
Testing & Debug
Testing คื(อการห้าขึ้�อผิ$ดพลาดว�าม�ห้ร(อไม�
Debug คื(อการห้าตำ��แหน�งขึ้องขึ้�อผิ$ดพลาด (เพ(�อจะได�แก�ไขึ้)
Testability
โป็รแกรมเมอร�ต์�องออกแบบโป็รแกรมท��ช่�วย่ให้�ขึ้บวนการในการทดสอบได�ง�าย่
Operability Observability Controllability Decomposability Simplicity Stability Understandability
การวางแผินการทดสอบ Test Plan
ระห้ว�างขึ้+�นต์อนการว$เคืราะห้� คืวรจ+ดท�าแผินการทดสอบห้ล+ก(Master Test Plan)
ระห้ว�างขึ้+�นต์อนออกแบบ คืวรจ+ดท�าแผินการทดสอบห้น�วย่ย่�อย่ (Unit Test Plan) แผินการทดสอบเบ�ดเสร�จ (Integration Test Plan) และแผินการทดสอบระบบ (System Test Plan)
ในการท�าแผินการทดสอบ จะต์�องระบ*ว�าทดสอบอะไร ใช่�อะไรทดสอบ กรณี�ต์�างๆท��ใช่�ทดสอบ ระบ*ใคืรร+บผิ$ดช่อบ
Test Approach
White-Box TestingBlack-Box Testing
White-Box Testing
= glass-box testing=test case design method that use
control structure of the procedural design to derive test Independent paths within modulesAll logical decisions on moduleAll loops and within their operational bounds Internal data structure
ป็ระเภทขึ้องwhite-box testing
1. Basis path testing พ$จารณีาคืวามซ+บซ�อนขึ้องเง(�อนไขึ้และส�วนขึ้องพ(�นฐานในการท�างานขึ้องระบบโดย่ม�มาต์รฐานการทดสอบด+งน��
Sequence If While Until Case
Notation
Flow graph notation Cyclomatic Complexity
V(G) =E – N + 2
= R
Graph Matrices Size of matrix = no. node on flow graph Matrix entries correspond to edges between nodes Link weight =1 if a edge exists = 0 if a edge not exists
ป็ระเภทขึ้องwhite-box testing (ต์�อ)
2. Control Structure testing อ(�นๆ1. Condition Testing คื(อว$ธี�การทดสอบโดย่
พ$จารณีา logical condition ในโมด4ล ซ��งจะม�ช่น$ดขึ้องerrorsในเง(�อนไขึ้ ได�แก�
Boolean operator error Boolean variable error Boolean parenthesis error Relational operator error Arithmetic expression error
ป็ระเภทขึ้องwhite-box testing (ต์�อ)
2. Control Structure testing อ(�นๆ2. Loop Testing เป็�นการทดสอบท��ม*�งเน�นในการ
ต์รวจสอบคืวามถู4กต์�องขึ้องโคืรงสร�างการวนซ��า สามารถูน$ย่ามร4ป็แบบการวนซ��า ได�ด+งน��
Simple loops Nested loops Concatenated loops Unstructured loops
Black-Box Testing
ม*�งเน�นท�� function requirements of softwareเป็�นการคื�นห้า errors
Incorrect or missing function Interface errorsError in data structures or external database
accessPerformance errors Initialization and termination errors
Testing for Environment
Testing GUIsFor windows
การเป็6ดwindows ส+มพ+นธี�ก+บเมน4?ขึ้ย่าย่,move,scrolledได�ห้ร(อไม�ขึ้�อม4ลท��แสดงถู4กต์�อง? และสามารถูระบ*ต์�าแห้น�งได�ด�วย่
เมาส�,function key, คื�ย่�บอร�ดFor pull-down menus and mouse operationsData entry
Testing of Client-Server ArchitectureTesting Documentation and Help
Test Design Technique
Functional Testing ทดสอบ action, operation, service etc.
Boundary Value Analysis Test input highest or lowest values System fail when massage empty or full Database system fail the first time disk capacity is
exceeded Equivalence Class Partitioning
Set of possible values (Domain) ส�วนย่�อย่ขึ้องdomain เร�ย่กว�า Equivalence Class จะต์�องทดสอบท*กๆคื�าท��ใส�เขึ้�าไป็
Test Design Technique (ต์�อ)
Cause-Effect GraphingLogic, predicate, or condition testing
State-Directed TestingTest sequence of transitions among screens
or menusSelect input values to exercise transitions in
prescribed valid and invalid sequence
Test Design Technique (ต์�อ)
Event-Directed TestingEvent เป็�นต์+วท��ท�าให้�เก$ดการกระท�าและเก$ด state-
transition Test every event to find failure
Other Test Design TechniquesTest RulesTest Recursive Structure of data
Reference