<< Chapter < Page
  Software engineering     Page 6 / 15
Chapter >> Page >

Black-box testing

The black-box approach is a testing method in which test data are derived from the specified functional requirements without regard to the final program structure. It is also termed data-driven, input/output driven, or requirements-based testing. Because only the functionality of the software module is of concern, black-box testing also mainly refers to functional testing - a testing method emphasized on executing the functions and examination of their input and output data. The tester treats the software under test as a black box - only the inputs, outputs and specification are visible, and the functionality is determined by observing the outputs to corresponding inputs. In testing, various inputs are exercised and the outputs are compared against specification to validate the correctness. All test cases are derived from the specification. No implementation details of the code are considered.

It is obvious that the more we have covered in the input space, the more problems we will find and therefore we will be more confident about the quality of the software. Ideally we would be tempted to exhaustively test the input space. But as stated above, exhaustively testing the combinations of valid inputs will be impossible for most of the programs, let alone considering invalid inputs, timing, sequence, and resource variables. Combinatorial explosion is the major roadblock in functional testing. To make things worse, we can never be sure whether the specification is either correct or complete. Due to limitations of the language used in the specifications (usually natural language), ambiguity is often inevitable. Even if we use some type of formal or restricted language, we may still fail to write down all the possible cases in the specification. Sometimes, the specification itself becomes an intractable problem: it is not possible to specify precisely every situation that can be encountered using limited words. And people can seldom specify clearly what they want - they usually can tell whether a prototype is, or is not, what they want after they have been finished. Specification problems contributes approximately 30 percent of all bugs in software.

The research in black-box testing mainly focuses on how to maximize the effectiveness of testing with minimum cost, usually the number of test cases. It is not possible to exhaust the input space, but it is possible to exhaustively test a subset of the input space. Partitioning is one of the common techniques. If we have partitioned the input space and assume all the input values in a partition is equivalent, then we only need to test one representative value in each partition to sufficiently cover the whole input space. Domain testing partitions the input domain into regions, and consider the input values in each domain an equivalent class. Domains can be exhaustively tested and covered by selecting a representative value(s) in each domain. Boundary values are of special interest. Experience shows that test cases that explore boundary conditions have a higher payoff than test cases that do not. Boundary value analysis requires one or more boundary values selected as representative test cases. The difficulties with domain testing are that incorrect domain definitions in the specification can not be efficiently discovered.

Questions & Answers

draw and explain state and activity diagram of library management system
Prashant Reply
explain association and generalisation with library system diagram
Prashant Reply
what do you mean by functional and non functional requirements
functional - describes what a software system should do . non functional - place constraints on how the will do so
non functional requirement include: quility . reliability . response time . security . privacy . effectiveness . maintainability . robustness scalability . fault tolerance . extensibility . efficiency . portability . resilience ... .
What does encapsulation mean?
Sravanthi Reply
Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines. ... Now we can use setter and getter methods to set and get the data in it. The Java Bean class is the example of a fully encapsulated class.
What is software Engineering
Jakisay Reply
Sofyware engineering is the application of principles used in the field of engineering which usually deals with phsical systems to the design, testing, development, deployment and management of software systems
what is cocomo model
Shrudhi Reply
The Constructive Cost Model is a procedural software cost estimation model developed by Barry W. Boehm. The model parameters are derived from fitting a regression formula using data from historical projects
Please is there any scholarship for African students undergraduate for now
Awal Reply
4 generation technology
Richa, what is your question?
what is the work of software engineer
mercy Reply
steps of developing a software
latest Reply
bamori project
which approach used to reduce number of test cases
Harshdeep Reply
I wish to ask what is the mean of a data model
Ateke Reply
explanation of working of computer
Gulfam Reply
How are u guys
What is software engineering
parfait Reply
explain basic path testing for triangle problem?
Janavi Reply

Get the best Software engineering course in your pocket!

Source:  OpenStax, Software engineering. OpenStax CNX. Jul 29, 2009 Download for free at http://cnx.org/content/col10790/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software engineering' conversation and receive update notifications?