Rekayasa Perangkat Lunak
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Bagian 13 FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 2
Outline of this presentation Who Tests Software Testing Technique Testing Step Testing Strategy FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Who Tests Software? independent tester developer user FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Who Tests Software? Software Developer Understand system Test gently Driven by delivery Independent Tester Doesn’t understand system Will try to break it Quality driven FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Who Tests Software? User Test while using it It’s not in purpose to do so Indirect test FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Static verification Review (desk checking) Code reading done by a single person, informal. Uneffective compared to walkthrough or inspection Walkthrough The programmer(s) ”walks through”/”executes” his code while invited participants ask questions and makes comments. Relatively informal Inspection Usually a checklist of common errors is used to compare the code against. FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Technique Two views on Software testing: White Box Testing Black box Black Box Testing FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Technique White box testing - tests what the program does. Test sets are developed by using knowledge of the algorithms, data structures, and control statements. FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Technique Black box testing - tests what the program is supposed to do. Test sets are developed and evaluated solely on the specification. There is no knowledge of the algorithms, data structures, or control statements. Black box FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 White-box testing Also known as: Structure based (Structural) testing Code based testing Glass box testing Clear box testing Logic driven testing FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 White-box testing White-box (or Structural) testing: Use knowledge of the program to derive test cases to provide more complete coverage Problem: What criteria to use? Two basic strategies for figuring out a test plan: black-box or white-box. (There are also points inbetween.) One is not better than the other. Black-box testing uses boundary analysis, input equivalence partitioning, etc. We’ll be focusing on white-box. We’ll go through a quick example on the board about the differences. FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 White-box testing ... our goal is to ensure that all Statements, decisions, conditions, and paths have been executed at least once ... FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 White-box testing The system is looked upon as an open box. The test cases is based on the internal structure of the system (code) Theoretically desirable but impossible and insufficient goal: all paths of the code exercise FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Black-box testing Black box Also known as: Functional Testing because it test all the functions Behavioral Testing because the program is tested against the expected behavior (described by requirements and/or design) FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Black-box testing requirements input events output The software is viewed as a black box which transforms input to output based on the specifications of what the software is supposed to do. FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Black-box testing Check The Conformity of the tested S/W against established behaviour, and Detect errors generated by fault Software fault is a software part which is not according to its definition provided in the development document FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Black-box testing Functional tests examine the observable behavior of software as evidenced by its outputs without reference to internal functions. If the program consistently provides the desired features with acceptable performance, then specific source code features are irrelevant. FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Black-box testing Should consider only from the standpoint of its: Input data Output data Knowledge of its internal structured should not be It is very often impossible to test all the input data It is hence necessary to select a subset of possible input FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Steps Unit test Integration Function Performance Acceptance Installation Unit code . Integrated modules Functioning system Verified, validated software Accepted SYSTEM IN USE! Design specifications System functional requirements Other Customer specification User environment FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
Testing Steps Acceptance Test software tests customer developer site type of acceptance testing performed by customer at the developer’s site is usually called alpha testing FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
Testing Steps Acceptance Test software customer site customer tests beta testing is a type of acceptance testing involving a software product to be marketed for use by many users selected users receive the system first and report problems back to the developer users enjoy it - usually receive large discounts and feel important developers like it - exposes their product to real use and often reveals unanticipated errors FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Strategy Big Bang! Top-down Bottom-up non-incremental incremental Sandwich Compromise FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13 Testing Strategy Big bang integration (all components together) Bottom up integration (from lower levels No test stubs necessary) Top down integration (from higher levels no test drivers are needed) Sandwich testing (combination of bottom-up and top-down no test stubs and drivers needed) FAKULTAS TEKNOLOGI INFORMASI REKAYASA PERANGKAT LUNAK – KP146 – 3 SKS – BAG 13
Finished, Questions?