a.k.a structural testing WHITE BOX TESTING clear box testing Rekayasa Perangkat Lunak 2009/2010 a.k.a structural testing clear box testing glass box testing WHITE BOX TESTING
Rekayasa Perangkat Lunak 2009/2010 White Box Testing? metode uji yang mempertimbangkan mekanisme internal sistem atau komponen dari sistem (IEEE). Test case yang dihasilkan dapat: Menjamin seluruh independent path di dalam modul telah dijalankan sekurang-kurangnya sekali Menjalankan seluruh logical decision baik dari sisi benar maupun salah Menjalankan seluruh loop sesuai dengan batasannya Menjalankan seluruh struktur data internal untuk menjamin validitas data
“Bugs lurk in corners and congregate at boundaries.” Boris Beizer Rekayasa Perangkat Lunak 2009/2010 Why white box? “Bugs lurk in corners and congregate at boundaries.” Boris Beizer
Prinsip White Box Unit testing individual software units. Rekayasa Perangkat Lunak 2009/2010 Prinsip White Box Unit testing individual software units. Integration testing in which software components, hardware components, or both are combined and tested to evaluate the interaction between them Regretion testing verify that modifications have not caused unintended effects and that the system or component still complies with its specified requirements
Control Structure Testing Rekayasa Perangkat Lunak 2009/2010 Metode White Box Basis Path Testing Control Structure Testing
Rekayasa Perangkat Lunak 2009/2010 Basis Path Testing If a player lands on a property owned by other players, he or she needs to pay the rent. If the player does not have enough money, he or she is out of the game. If the property is not owned by any players, and the player has enough money buying the property, he or she may buy the property with the price associated with the property.
Basis Path Testing (cont...) Rekayasa Perangkat Lunak 2009/2010 Basis Path Testing (cont...)
Basis Path Testing (cont...) Rekayasa Perangkat Lunak 2009/2010 Basis Path Testing (cont...) Independent Path/cyclomatic number (lower bound): 1-2-3-4-5-10 (property owned by others, no money for rent) 1-2-3-4-6-10 (property owned by others, pay rent) 1-2-3-10 (property owned by the player) 1-2-7-10 (property available, don’t have enough money) 1-2-7-8-10 (property available, have money, don’t want to buy it) 1-2-7-8-9-10 (property available, have money, and buy it)
Basis Path Testing (cont...) Rekayasa Perangkat Lunak 2009/2010 Basis Path Testing (cont...) Graph Matrices memudahkan Basis Path Testing
Control Structure Testing Rekayasa Perangkat Lunak 2009/2010 Control Structure Testing Condition testing exercises the logical conditions contained in a program module Data flow testing selects test paths of a program according to the locations of definitions and uses of variables in the program Loop testing