Testing Implementasi Sistem Oleh :Rifiana Arief, SKom, MMSI Pertemuan 3 Black Box Testing Oleh :Rifiana Arief, SKom, MMSI
Outline Test case Design methods Black Testing Definition Advantages and Disadvantages Black Box testing Black Box Testing Type Test case Design methods
What is Black-Box testing ? Testing without having an insight into the details of underlying code input output Unit Testing based on specification
What is Black-Box testing ? Advantages no need for source code can be used for unit as well as system-level testing Disadvantages don't test hidden functions Approaches: Error guessing Equivalence Partitioning Boundary Value Analysis Decision tables Cause-Effect Graphing Tests derived from functional requirements (e.g. use cases)
Type of Black-Box testing ? Security Testing Networks Access right Type of Users Performance Testing Load testing Stress |Testing
Type of Black-Box testing ? Usability Testing User interface testing Manual support Testing Spell Checking Functionality Testing Configuration Testing Compatibility Testing Functional Testing What Client wants Installation Testing Input domain Testing Boundary Values Equivalence Class partition Recovery testing etc…
Test case Design methods 1. Equivalence Partitioning 2. Boundary Value Analysis 3. Error Guessing
Equivalence partitioning Input Domain Equivalence class is a subset of data that is representative of a larger class Divide input domain into equivalence classes Attempt to cover classes of errors One test case per equivalence class, to reduce total number of test cases needed Input data and output results often fall into different classes where all members of a class are related Each of these classes is an equivalence partition where the program behaves in an equivalent way for each class member Test cases should be chosen from each partition
Example A program which accepts credit limits with a given range Say, $10,000 – $15,000 This would have three equivalence classes:- Program specification states that the system will accept between 4 and 10 inputs which are 5-digit integers. Partition system inputs and outputs into ‘equivalence sets’ If input is a 5-digit integer between 10000 ad 99999, equivalence partitions are <10000, 10000-99999 and >10000 Choose test cases at the boundary of these sets 00000, 09999, 10000, 99999, 10001 1. Less than $10,000 (Invalid) 2. Between $10,000 and $15,000 (Valid) 3. Greater than $15,000 (Invalid)
Equivalence Partitions 12500 18000 9800 Less than 10,000 Between 10 and 15 More than 15,000
Boundary Value Analysis A technique that consists of developing test cases and data that focus on the input and output boundaries of a given function Complements equivalence partitioning , selects the test cases at the “edge” of equivalence classes. In practice, more errors found at boundaries of equivalence classes than within the classes Divide input domain into equivalence classes
Example In the same credit limit example: the boundary analysis would test 1. low boundary plus or minus one ($ 9,999 and $10,001) 2. On the boundary ($10,000 and $15000) 3. Upper boundary plus or minus one ($14999 and $15001)
Range of Boundary Values Value immediately below range First value of range Second value of range Value immediately below last value of range Last value of range Value immediately above range
Error Guessing Based on the theory that test cases can be developed based upon the intuition and experience of the Test Engineer. In an example where one of the inputs is the date and the Test Engineer may try February 29, 2000 or 9/9/9999
Metode Pengujian Black Box Metode ujicoba blackbox memfokuskan pada keperluan fungsional dari software. Karna itu ujicoba blackbox memungkinkan pengembang software untuk membuat himpunan kondisi input yang akan menguji seluruh syarat-syarat fungsional suatu program. Ujicoba blackbox bukan merupakan alternatif dari ujicoba whitebox, tetapi merupakan pendekatan yang melengkapi untuk menemukan kesalahan lainnya, selain menggunakan metode whitebox. Tidak seperti metode whitebox yang dilaksanakan diawal proses, ujicoba blackbox diaplikasikan dibeberapa tahapan berikutnya. Karena ujicoba blackbox dengan sengaja mengabaikan struktur kontrol, sehingga perhatiannya difokuskan pada informasi domain.
Ujicoba blackbox berusaha untuk menemukan kategori kesalahan : Fungsi-fungsi yang salah atau hilang Kesalahan interface Kesalahan dalam struktur data atau akses database eksternal Kesalahan performa Kesalahan inisialisasi dan terminasi