Professional Documents
Culture Documents
Rekayasa Perangkat Lunak (IK370) : Software Testing Techniques - 1
Rekayasa Perangkat Lunak (IK370) : Software Testing Techniques - 1
1
5/8/2015
IEEE / ANSI
1. The process of operating a system or component under specified conditions,
observing or recording the results, and making an evaluation of some aspect
of the system/component
Software Testing
2
5/8/2015
Software Testability
Testing Show
errors
requirements conformance
performance
an indication of quality
3
5/8/2015
Developer
Understands the system but, will test "gently“and, is driven by "delivery"
Independent Tester
Must learn about the system, but, will attempt to break it and, is driven by quality
SW Customer
The Group that contracts for SW to be developed
SW User
The Group that will use the SW
SW Developer
The Group that develops the SW
SW Tester
The Group that performs the check function on the SW
Information Services Management
The group with the responsibility for fulfilling the Information Service Mission
Senior Organization Management
The executive
Auditor
The group having the responsibility to evaluate the effectiveness, efficiency and the
adequacy of control in information services area.
4
5/8/2015
By executing code
5
5/8/2015
What’s Defect
Categories of defects
– Wrong - The specification have been implemented incorrectly (variance from user)
– Missing - A specified requirement is not built into product (variance from product specification)
– Extra - A requirement incorporated into the product that was not specified (variance from product specification)
Defect vs Failure
– Defect is incorporated in software system (it can be found within the SW, manuals or documentation) and a flaw
– Defect that causes an error in operation is called a failure
Defect will turn into failure, the failure will damage the organization
Errors, Mistake...
Some terms
– Mistake: a human action that produces an incorrect result
– Fault : An incorrect step, process, or data definition in a computer program.
The outgrowth of the mistake (potentially leads to failure)
– Failure : An incorrect result. The result (manifestation) of the fault
(e.g., a crash)
– Error : The amount by which the result is incorrect
6
5/8/2015
Software Problem
– Incomplete Design or Erroneous decision-making criteria
• actions have been incorrect
• inappropriate decision making criteria
– Fail to meet customer requirement
• logic error or programming error
– Ommitting needed edit checks for completeness of output data
• Data Problems
– Data Integrity
• Incomplete Data
• Incorrect Data
• Inconsistency Data
• Obsolete Data
7
5/8/2015
Full Testing
starts no later than the requirement phase and continues through acceptance testing
Partial Testing
begins any time after functional design has been completed, with less than optimal influence on
requirements and functional design
Endgame Testing
is highly validation oriented, with no influence on requirements or functional design
Audit-Level Testing
is a barebones audit plans,
procedures,
and products for adequacy,
correctness,
and compliance to standards.
8
5/8/2015
output
input
events
# Black Box Testing is not an alternative to white box testing, rather it is a complementary approach that
is likely to uncover a different class of errors than white box methods.
# Attempts to find:
incorrect or missing functions, interface errors, errors in data structures or
external database access, performance errors, initialization and termination
errors.
9
5/8/2015
Equivalence Partitioning
Boundary Value Analysis/Limit Testing
Comparison Testing
Sample Testing
Robustness Testing
Behavior Testing
Requirement Testing
Performance Testing
Endurance Testing
Cause-Effect Relationship Testing
Example:
• Requirements of the subprogram to be tested (initial&final state)
– The subprogram takes an integer input in the range [-100,100]
– The output of the subprogram is the sign of the input value (the value 0 is considered positive)
• Two valid equivalence class
– The input range [-100,-1] which contains the subset of integer, will produce negative sign as an output
– The input range [0,100] will produce positive sign
• Two invalid equivalence class
– The integers strictly less than -100
– The integers strictly more than 100
10
5/8/2015
Examples:
– For a range of values bounded by a and b, test (a-1), a, (a+1), (b-1), b, (b+1).
– If input conditions specify a number of values n, test with (n-1), n and (n+1) input values.
– Apply 1 and 2 to output conditions (e.g., generate table of minimum and maximum size).
– If internal program data structures have boundaries (e.g., buffer size, table limits), use input data to
exercise structures on boundaries.
11
5/8/2015
• Sample testing involves selecting a number of values from an equivalence class of input data
• The purpose of this test is to prove that no catastrophic event can be produced by the
introduction of an abnormal input data item
12
5/8/2015
• A behavior tests is a test for which the result obtained cannot be evaluated after a single
execution of program, but can be evaluated only after a set of linked calls to subprogram
(several calls to a given subprogram, a call to several different subprogram)
– E/g : stack
13
5/8/2015
• Performance testing evaluates the computer system’s ability to operate correctly with regard
to the requirement concerning, for
example:
– data flow, memory size, execution time, etc
• Endurance Testing involves repeating a given test case a certain number of times in order to
evaluate a computer system’s ability to meet requirements.
• For example:
– the regularity in the accuraccy of certain mathematics operations
(floating point, rounding off, etc)
14
5/8/2015
• This technique supplements equivalence testing by providing ways of determining and selecting
combinations of input data
• It involves representing the input state (cause) and output states (effect) deduced from functional
requirements associated with the computer system in the form of a graph represented by logical relationship
(decision table), to avoid of having defined too many test cases
• A CITROEN car will be identified by a letter A, B or C, and have the letter X as the second
character. Messages M1 and M2 must be sent in the event of an error in the first or second
character respectively. If the identifier is correct, it is inserted in the database.
• The the input state (the causes) and the output states (the effect) can be determined:
Input states:
1. 1st character: A
2. 1st character: B
3. 1st character: C
4. 2nd character: X
Output states:
A. database
insertion
B. message M1
C. message M2
15
5/8/2015
Selesai
16