| | Book ShopNew | Testing Tools | Testing Books | Testing Directory | Testing JobsNew | Testing CertificationsNew | |
testingsense.com
A forum to discuss Software Testing
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Software Testing Jobs
Only Software Testing Jobs
And Nothing Else
Applying a Variant Black Box Technique

 
Post new topic   Reply to topic    testingsense.com Forum Index -> Black Box testing
View previous topic :: View next topic  
Author Message
stone



Joined: 29 Aug 2007
Posts: 16

PostPosted: Sat Sep 15, 2007 2:43 pm    Post subject: Applying a Variant Black Box Technique Reply with quote

How to Applying a Variant Black Box Technique?
Back to top
View user's profile Send private message
shikhawat



Joined: 29 Aug 2007
Posts: 17

PostPosted: Sat Sep 15, 2007 2:51 pm    Post subject: Applying a Variant Black Box Technique... Reply with quote

The first two test suites were developed using a variant black box testing technique. It is less a new technique
than a codification of good practice. Its first stage follows these steps:
Black 1: Test conditions are methodically generated from the form of the specification. For example, a
precondition of the form "X must be true" generates two test conditions: "X is true" and "X is false",
regardless of what X actually is. These test conditions are further refined by processing connectives like
AND and OR (using rules similar to cause-effect testing [Myers79]). For example, "X AND Y" generates
three test cases:
X is true, Y is true.
X is false, Y is true.
X is true, Y is false.
Black 2: Next, test conditions are generated from the content of the specification. Specifications contain
cliches [Rich90]. A search of a circular list is a typical cliche. Certain data types are also used in a cliched
way. For example, the UNIX pathname as a slash-separated string is implicit in many specifications.
Cliches are identified by looking at the nouns and verbs in the specification: "search", "list", "pathname".
The implementations of these cliches often contain cliched faults.1 For example:
(1) If the specification includes a search for an element of a circular list, one test condition is that the list
does not include the element. The expectation is that the search might go into an infinite loop.
(2) If a function decomposes and reconstructs UNIX pathnames, one test condition is that it be given a
pathname of the form "X//Y", because programmers often fail to remember that two slashes are
equivalent to one.
Because experienced testers know cliched faults, they use them when generating tests. However, writing
the cliches and faults down in a catalog reduces dependency on experience and memory. Such a catalog
has been written; sample entries are given in Appendix B.
Black 3: These test conditions are combined into test cases. A test case is a precise description of particular
input values and expected results.
The next stage is called broken box testing2. It exposes information that the specification hides from the
user, but that the tester needs to know. For example, a user neednt know that a routine uses a hash table,
but a tester would want to probe hash table collision handling. There are two steps:
Broken 1: The code is scanned, looking for important operations and types that arent visible in the
specification. Types are often recognized because of comments about the use of a variable. (A variables
declaration does not contain all the information needed; an integer may be a count, a range, a percentage,
or an index, each of which produces different test conditions.) Cliched operations are often distinct blocks
of code separated by blank lines or comments. Of course, the key way you recognize a cliche is by having
seen it often before. Once found, these cliches are then treated exactly as if they had been found in the
specification. No attempt is made to find and satisfy coverage conditions. (The name indicates this: the
box is broken open enough for us to see gross features, but we dont look at detail.)
Broken 2: These new test conditions are combined into new test cases.
In production use, a tester presented with a specification and a finished program would omit step Black3.
Test conditions would be derived from both the specification and the code, then combined together. This
would minimize the size of the test suite. For this experiment, the two test suites were kept separate, in
order to see what the contribution of looking at the code would be. This also simulates the more desirable
case where the tests are designed before the code is written. (Doing so reduces elapsed time, since tests
can be written while the code is being written. Further, the act of writing concrete tests often discovers
errors in the specification, and its best to discover those early.)
In this experiment, the separation is artificial. I wrote the specifications for six of the programs, laid them
aside for a month, then wrote the test cases, hoping that willful forgetfulness would make the black box
testing less informed by the implementation.

By Brian Marick
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    testingsense.com Forum Index -> Black Box testing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
| | Book ShopNew | Testing Tools | Testing Books | Testing Directory | Testing JobsNew | Testing CertificationsNew | |